]> git.openstreetmap.org Git - nominatim.git/commitdiff
faster query through bbox preselection
authorgemo1011 <moritzgeiger91@web.de>
Thu, 3 May 2018 15:44:18 +0000 (17:44 +0200)
committergemo1011 <moritzgeiger91@web.de>
Tue, 5 Jun 2018 09:54:12 +0000 (11:54 +0200)
lib/ReverseGeocode.php

index f720eea309a5fafc4ed9b7c7893426e06b8126ff..9576fafc14e91d4315cb9b9554aa4f185fdb9d41 100644 (file)
@@ -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';