mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 01:47:57 +00:00
faster query through bbox preselection
This commit is contained in:
@@ -103,6 +103,8 @@ class ReverseGeocode
|
||||
$sSQL .= ' AND type != \'postcode\'';
|
||||
$sSQL .= ' AND name IS NOT NULL ';
|
||||
$sSQL .= ' and class not in (\'waterway\',\'railway\',\'tunnel\',\'bridge\',\'man_made\')';
|
||||
// preselection through bbox
|
||||
$sSQL .= ' AND (SELECT geometry FROM placex WHERE place_id = '.$iPlaceID.') && geometry';
|
||||
$sSQL .= ' ORDER BY distance ASC,';
|
||||
$sSQL .= ' rank_address DESC';
|
||||
$sSQL .= ' limit 500) as a';
|
||||
|
||||
Reference in New Issue
Block a user