2     header("content-type: text/html; charset=UTF-8");
 
   3     include(CONST_BasePath.'/lib/template/includes/html-header.php');
 
   5     <title>Nominatim Broken Polygon Data</title>    
 
   6     <meta name="description" content="List of broken OSM polygon data by date" lang="en-US" />
 
  11 <div class="container">
 
  12     <h1>Broken polygons</h1>
 
  15         Total number of broken polygons: <?php echo $iTotalBroken ?>.
 
  16         Also available in <a href="<?php echo CONST_Website_BaseURL; ?>polygons.php?format=json">JSON format</a>.
 
  19     <table class="table table-striped table-hover">
 
  22 if (!empty($aPolygons)) {
 
  25     //var_dump($aPolygons[0]);
 
  26     foreach (array_keys($aPolygons[0]) as $sCol) {
 
  27         echo '<th>'.$sCol.'</th>';
 
  29     echo '<th> </th>';
 
  32     foreach ($aPolygons as $aRow) {
 
  33         if (isset($aSeen[$aRow['osm_type'].$aRow['osm_id']])) continue;
 
  34         $aSeen[$aRow['osm_type'].$aRow['osm_id']] = 1;
 
  37         $sOSMType = formatOSMType($aRow['osm_type']);
 
  38         foreach ($aRow as $sCol => $sVal) {
 
  41                     if (preg_match('/Self-intersection\\[([0-9.\\-]+) ([0-9.\\-]+)\\]/', $sVal, $aMatch)) {
 
  42                         $aRow['lat'] = $aMatch[2];
 
  43                         $aRow['lon'] = $aMatch[1];
 
  44                         $sUrl = sprintf('https://www.openstreetmap.org/?lat=%f&lon=%f&zoom=18&layers=M&%s=%d',
 
  49                         echo '<td><a href="'.$sUrl.'">'.($sVal?$sVal:' ').'</a></td>';
 
  51                         echo '<td>'.($sVal?$sVal:' ').'</td>';
 
  55                     echo '<td>'.osmLink(array('osm_type' => $aRow['osm_type'], 'osm_id' => $aRow['osm_id'])).'</td>';
 
  58                     echo '<td>'.($sVal?$sVal:' ').'</td>';
 
  62         $sJosmUrl = 'http://localhost:8111/import?url=https://www.openstreetmap.org/api/0.6/'.$sOSMType.'/'.$aRow['osm_id'].'/full';
 
  63         echo '<td><a href="'.$sJosmUrl.'" target="josm">josm</a></td>';