]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/ReverseGeocode.php
only starts the search in country_osm_grid if $iMaxRank > 4
[nominatim.git] / lib / ReverseGeocode.php
index 422159311557ea5cb77edca281b68cb1ebbbe0d4..0c0a394eb488f6f4ed38d0e43f68db1acf73b074 100644 (file)
@@ -266,7 +266,7 @@ class ReverseGeocode
                 $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
                 if ($aPlace) {
                     $oResult = new Result($aPlace['place_id']);
-                } else {
+                } elseif(!$aPlace && $iMaxRank > 4)  {
                     $aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank);
                     if ($aPlace) {
                         $oResult = new Result($aPlace['place_id']);
@@ -278,7 +278,7 @@ class ReverseGeocode
             $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank);
             if ($aPlace) {
                 $oResult = new Result($aPlace['place_id']);
-            } else {
+            } elseif(!$aPlace && $iMaxRank > 4) {
                 $aPlace = $this->noPolygonFound($sPointSQL, $iMaxRank);
                 if ($aPlace) {
                     $oResult = new Result($aPlace['place_id']);