]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/NearPoint.php
add tests for nearpoint sql functions
[nominatim.git] / lib / NearPoint.php
index 6a0e7598627f25d9a3b5673e5be0b01a50975a54..16b6dff5276be2ff79f07486fc69cfd9152dd8e2 100644 (file)
@@ -34,13 +34,7 @@ class NearPoint
 
     public function withinSQL($sObj)
     {
-        return sprintf(
-            'ST_DWithin(%S, ST_SetSRID(ST_Point(%F,%F),4326), %F)',
-            $sObj,
-            $this->fLon,
-            $this->fLat,
-            $this->fRadius
-            );
+        return sprintf('ST_DWithin(%s, %s, %F)', $sObj, $this->sSQL, $this->fRadius);
     }
 
     /**