X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/0d9fe6e49c3cee131d2fd0c2c0ad2e59065621f9..27af9b102c2d6167b9025d594f8cb75e4dd76a03:/lib-php/ReverseGeocode.php?ds=inline diff --git a/lib-php/ReverseGeocode.php b/lib-php/ReverseGeocode.php index cf396b7a..64fc214e 100644 --- a/lib-php/ReverseGeocode.php +++ b/lib-php/ReverseGeocode.php @@ -74,8 +74,6 @@ class ReverseGeocode protected function lookupLargeArea($sPointSQL, $iMaxRank) { - $oResult = null; - if ($iMaxRank > 4) { $aPlace = $this->lookupPolygon($sPointSQL, $iMaxRank); if ($aPlace) { @@ -167,9 +165,13 @@ class ReverseGeocode { Debug::newFunction('lookupPolygon'); // polygon search begins at suburb-level - if ($iMaxRank > 25) $iMaxRank = 25; + if ($iMaxRank > 25) { + $iMaxRank = 25; + } // no polygon search over country-level - if ($iMaxRank < 5) $iMaxRank = 5; + if ($iMaxRank < 5) { + $iMaxRank = 5; + } // search for polygon $sSQL = 'SELECT place_id, parent_place_id, rank_address, rank_search FROM'; $sSQL .= '(select place_id, parent_place_id, rank_address, rank_search, country_code, geometry'; @@ -190,7 +192,6 @@ class ReverseGeocode if ($aPoly) { // if a polygon is found, search for placenodes begins ... - $iParentPlaceID = $aPoly['parent_place_id']; $iRankAddress = $aPoly['rank_address']; $iRankSearch = $aPoly['rank_search']; $iPlaceID = $aPoly['place_id']; @@ -356,7 +357,6 @@ class ReverseGeocode $oResult = new Result($aHouse['place_id'], Result::TABLE_OSMLINE); $oResult->iHouseNumber = closestHouseNumber($aHouse); $aPlace = $aHouse; - $iRankAddress = 30; } }