]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ReverseGeocode.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / ReverseGeocode.php
index 1de0893c4a7b46fcc886b6d5d3bf9d7d9262558e..9b43a3e38cdd8d2aabd8c5391b0aeee90898631b 100644 (file)
@@ -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