X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/dcab7a19e540ff22a49e8322d775f13657edc3bd..b6acd24e5abb3cb2fb871c75664f0540fe3102dc:/lib/ReverseGeocode.php?ds=sidebyside diff --git a/lib/ReverseGeocode.php b/lib/ReverseGeocode.php index b3899e3b..8fc22f69 100644 --- a/lib/ReverseGeocode.php +++ b/lib/ReverseGeocode.php @@ -153,7 +153,7 @@ class ReverseGeocode // look for an interpolation that is closer $aPlaceLine = $this->lookupInterpolation($sPointSQL, $fDistancePlacex); - if ($aPlaceLine) { + if ($aPlaceLine && (float) $aPlaceLine['distance'] < (float) $fDistancePlacex) { // interpolation is closer to point than placex house $bPlaceIsLine = true; $aPlace = $aPlaceLine;