]> git.openstreetmap.org Git - nominatim.git/commitdiff
Merge pull request #2866 from lonvia/reverse-ignore-interpolations-without-parent
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 7 Nov 2022 08:00:59 +0000 (09:00 +0100)
committerGitHub <noreply@github.com>
Mon, 7 Nov 2022 08:00:59 +0000 (09:00 +0100)
Ignore interpolations without parent on reverse search

lib-php/ReverseGeocode.php

index 77c16a5b09fe05b5ca5e9add4d06cb1dfbaba173..2aea90387a57d07d669b16f1ae9ed1a7347da729 100644 (file)
@@ -71,7 +71,8 @@ class ReverseGeocode
         $sSQL .= '  ST_Distance(linegeo,'.$sPointSQL.') as distance';
         $sSQL .= ' FROM location_property_osmline';
         $sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', linegeo, '.$fSearchDiam.')';
-        $sSQL .= ' and indexed_status = 0 and startnumber is not NULL ';
+        $sSQL .= '       and indexed_status = 0 and startnumber is not NULL ';
+        $sSQL .= '       and parent_place_id != 0';
         $sSQL .= ' ORDER BY distance ASC limit 1';
         Debug::printSQL($sSQL);