X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/fb0d219c7bc624693821cee87fd489798fe86e0a..3ccf466e2f335248d614546536e685e0d33ac32b:/website/reverse.php?ds=sidebyside diff --git a/website/reverse.php b/website/reverse.php index fda11582..b4ab97b6 100755 --- a/website/reverse.php +++ b/website/reverse.php @@ -100,13 +100,14 @@ $sSQL .= ' and (name is not null or housenumber is not null)'; $sSQL .= ' and class not in (\'waterway\',\'railway\',\'tunnel\',\'bridge\')'; $sSQL .= ' and (ST_GeometryType(geometry) not in (\'ST_Polygon\',\'ST_MultiPolygon\') '; + $sSQL .= ' and indexed_status = 0 '; $sSQL .= ' OR ST_DWithin('.$sPointSQL.', centroid, '.$fSearchDiam.'))'; $sSQL .= ' ORDER BY ST_distance('.$sPointSQL.', geometry) ASC limit 1'; if (CONST_Debug) var_dump($sSQL); $aPlace = $oDB->getRow($sSQL); if (PEAR::IsError($aPlace)) { - failInternalError("Could not determine closest place.", $sSQL, $iPlaceID); + failInternalError("Could not determine closest place.", $sSQL, $aPlace); } $iPlaceID = $aPlace['place_id']; $iParentPlaceID = $aPlace['parent_place_id'];