]> git.openstreetmap.org Git - nominatim.git/commitdiff
only starts the search in country_osm_grid if $iMaxRank > 4
authorgemo1011 <moritzgeiger91@web.de>
Wed, 23 May 2018 13:29:41 +0000 (15:29 +0200)
committergemo1011 <moritzgeiger91@web.de>
Wed, 27 Jun 2018 12:55:07 +0000 (14:55 +0200)
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']);