From 0dbc0ae6d5bde2a91e30a7f204ee5918ada875ee Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Sat, 5 Nov 2022 14:33:28 +0100 Subject: [PATCH] ignore interpolations without parent on reverse search If no parent can be found for an interpolation, there is most likely a data error involved. So don' t show these interpolations in reverse search results. --- lib-php/ReverseGeocode.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib-php/ReverseGeocode.php b/lib-php/ReverseGeocode.php index 77c16a5b..2aea9038 100644 --- a/lib-php/ReverseGeocode.php +++ b/lib-php/ReverseGeocode.php @@ -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); -- 2.39.5