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.
This commit is contained in:
Sarah Hoffmann 2022-11-05 14:33:28 +01:00
parent 7461ff4680
commit 0dbc0ae6d5

View File

@ -72,6 +72,7 @@ class ReverseGeocode
$sSQL .= ' FROM location_property_osmline';
$sSQL .= ' WHERE ST_DWithin('.$sPointSQL.', linegeo, '.$fSearchDiam.')';
$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);