function _one_row($aAddressLine)
{
    $bNotUsed = isset($aAddressLine['isaddress']) && $aAddressLine['isaddress'] == 'f';
    echo '<tr class="' . ($bNotUsed ? 'notused' : '') . '">';
    echo '  <td class="name">' . (trim($aAddressLine['localname']) ? $aAddressLine['localname'] : '<span class="noname">No Name</span>') . '</td>';
    echo '  <td>' . $aAddressLine['class'] . ':' . $aAddressLine['type'] . '</td>';
    echo '  <td>' . osm_link($aAddressLine) . '</td>';
    echo '  <td>' . (isset($aAddressLine['admin_level']) ? $aAddressLine['admin_level'] : '') . '</td>';
    // echo '<td>' . (isset($aAddressLine['rank_search_label']) ? $aAddressLine['rank_search_label'] : '') .'</td>';
    // echo ', <span class="area">'.($aAddressLine['fromarea']=='t'?'Polygon':'Point').'</span>';
    echo '  <td>' . format_distance($aAddressLine['distance']) . '</td>';
    echo '  <td>' . nominatim_link($aAddressLine, 'details &gt;') . '</td>';
    echo "</tr>\n";
}
Example #2
0
$query_affluents = "\nSELECT id1, name1, way1, id2, name2, way2,\n       rt1.tags->'waterway' AS waterway1, rt2.tags->'waterway' as waterway2\nFROM rivers_intersections\nLEFT JOIN rivers_tributary ON id1 = ANY(rivers) AND id2 = ANY(rivers)\nLEFT JOIN relations rt1 ON rt1.id = id1 AND rt1.tags ? 'waterway'\nLEFT JOIN relations rt2 ON rt2.id = id2 AND rt2.tags ? 'waterway'\nWHERE depth IS NULL AND rt1.tags->'waterway' != 'canal' AND rt2.tags->'waterway' != 'canal' AND\n                        rt1.tags->'waterway' != 'riverbank' AND rt2.tags->'waterway' != 'riverbank'\nORDER BY name1, name2;\n";
$res_affluents = pg_query($query_affluents);
print "<table border='1'>\n<tr>\n  <th colspan=4>Rivière 1</th>\n  <th colspan=4>Rivière 2</th>\n<tr>\n  <th>Nom</th>\n  <th>relation</th>\n  <th>way</th>\n  <th>waterway</th>\n  <th>Nom</th>\n  <th>relation</th>\n  <th>way</th>\n  <th>waterway</th>\n</tr>\n";
while ($affluent = pg_fetch_object($res_affluents)) {
    print "<tr>\n";
    print "  <td>{$affluent->name1}</td>\n";
    $osm_id_lien = osm_link("relation", $affluent->id1);
    print "  <td>{$osm_id_lien}</td>\n";
    $osm_id_lien = osm_link("way", $affluent->way1);
    print "  <td>{$osm_id_lien}</td>\n";
    print "  <td>{$affluent->waterway1}</td>\n";
    $osm_id = $affluent->id2;
    print "  <td>{$affluent->name2}</td>\n";
    $osm_id_lien = osm_link("relation", $affluent->id2);
    print "  <td>{$osm_id_lien}</td>\n";
    $osm_id_lien = osm_link("way", $affluent->way2);
    print "  <td>{$osm_id_lien}</td>\n";
    print "  <td>{$affluent->waterway2}</td>\n";
    print "</tr>\n";
}
pg_free_result($res_affluents);
print "</table>";
print "<h2>Rivières qui ne sont pas affluents d'une autre rivière</h2>\n";
$query_affluents = "\nSELECT rt.id AS id, rt.tags->'name' AS name,\n       rt.tags->'ref:sandre' AS sandre, rt.tags->'waterway' AS waterway\nFROM relations rt\nLEFT JOIN rivers_tributary ON rt.id = ANY(rivers[2:100]) \nLEFT JOIN rivers_coastline_intersections inter ON rt.id = inter.id1\nWHERE rt.tags->'type' = 'waterway' AND depth IS NULL AND\n      NOT rt.tags->'waterway' = 'canal' AND NOT rt.tags->'waterway' = 'riverbank' AND\n      inter.way2 IS NULL\nORDER BY rt.tags->'name';\n";
$res_affluents = pg_query($query_affluents);
print "<table border='1'>\n<tr>\n  <th>Nom</th>\n  <th>OSM</th>\n  <th>Sandre</th>\n  <th>waterway</th>\n</tr>\n";
while ($affluent = pg_fetch_object($res_affluents)) {
    $osm_id = $affluent->id;
    $sandre = $affluent->sandre;
    print "<tr>\n";
    print "  <td>{$affluent->name}</td>\n";
echo $aPointDetails['localname'];
?>
</h1>
				<div class="locationdetails">
					<h2 class="bg-danger">This object has an invalid geometry.</h2>

					<div>
						Type: <span class="type"><?php 
echo $aPointDetails['class'] . ':' . $aPointDetails['type'];
?>
</span>
					</div>

					<div>
						OSM: <span class="label"><?php 
echo osm_link($aPointDetails);
?>
<span>
					</div>


					<h4>Error</h4>
					<p>
						<?php 
echo $aPointDetails['errormessage'] ? $aPointDetails['errormessage'] : 'unknown';
?>
					</p>
					<?php 
if (osm_map_url($aPointDetails)) {
    ?>
						<a href="<?php