X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/6867b240d5d23c22ae04c57d65881d54d793da73..174fca9c7ae30ad4bab666f2bdcdb288ed188e3e:/lib/ReverseGeocode.php diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index 1de0893c..9b43a3e3 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -66,15 +66,22 @@ class ReverseGeocode ); } + public function lookup($fLat, $fLon, $bDoInterpolation = true) + { + return $this->lookupPoint( + 'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)', + $bDoInterpolation + ); + } + /* lookup() * returns { place_id =>, type => '(osm|tiger)' } * fails if no place was found */ - public function lookup($fLat, $fLon, $bDoInterpolation = true) + public function lookupPoint($sPointSQL, $bDoInterpolation = true) { - $sPointSQL = 'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)'; $iMaxRank = $this->iMaxRank; // Find the nearest point