reduce search radius when searching for nodes within country

This commit is contained in:
Sarah Hoffmann 2018-08-19 18:08:05 +02:00
parent a9b4894b07
commit ff4b1758e1

View File

@ -117,7 +117,7 @@ class ReverseGeocode
$sSQL .= ' AND class = \'place\' AND type != \'postcode\'';
$sSQL .= ' AND name IS NOT NULL ';
$sSQL .= ' and indexed_status = 0 and linked_place_id is null';
$sSQL .= ' AND ST_DWithin('.$sPointSQL.', geometry, 5.0)) p ';
$sSQL .= ' AND ST_DWithin('.$sPointSQL.', geometry, 1.8)) p ';
$sSQL .= 'WHERE distance <= reverse_place_diameter(rank_search)';
$sSQL .= ' ORDER BY rank_search DESC, distance ASC';
$sSQL .= ' LIMIT 1';