X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/eb0b3bfa4cd74ee9e425c54868a30d8859e694cd..35df2bb75eae78f38b347f26862fa4cb8284d574:/lib/ReverseGeocode.php?ds=sidebyside diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index 509ec0a8..c56c9b29 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -1,16 +1,20 @@ oDB =& $oDB; } - function setZoom($iZoom) + + public function setZoom($iZoom) { // Zoom to rank, this could probably be calculated but a lookup gives fine control $aZoomRank = array( @@ -38,9 +42,14 @@ class ReverseGeocode $this->iMaxRank = (isset($iZoom) && isset($aZoomRank[$iZoom]))?$aZoomRank[$iZoom]:28; } - // returns { place_id =>, type => '(osm|tiger)' } - // fails if no place was found - function lookup($fLat, $fLon, $bDoInterpolation = true) + + /* lookup() + * returns { place_id =>, type => '(osm|tiger)' } + * fails if no place was found + */ + + + public function lookup($fLat, $fLon, $bDoInterpolation = true) { $sPointSQL = 'ST_SetSRID(ST_Point('.$fLon.','.$fLat.'),4326)'; $iMaxRank = $this->iMaxRank; @@ -111,7 +120,7 @@ class ReverseGeocode if ($aPlaceLine) { if (CONST_Debug) var_dump('found housenumber in interpolation lines table', $aPlaceLine); if ($aPlace['rank_search'] == 30) { - // if a house was already found in placex, we have to find out, + // if a house was already found in placex, we have to find out, // if the placex house or the interpolated house are closer to the searched point // distance between point and placex house $sSQL = 'SELECT ST_distance('.$sPointSQL.', house.geometry) as distance FROM placex as house WHERE house.place_id='.$iPlaceID; @@ -204,5 +213,4 @@ class ReverseGeocode 'fraction' => ($bPlaceIsTiger || $bPlaceIsLine) ? $fFraction : -1 ); } - }