]> git.openstreetmap.org Git - nominatim.git/commitdiff
make sure that linked places are within a boundary
authorSarah Hoffmann <lonvia@denofr.de>
Tue, 18 Feb 2020 21:46:32 +0000 (22:46 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Tue, 18 Feb 2020 21:46:32 +0000 (22:46 +0100)
This is a regression from previous code refactoring.

Fixes #1684.

sql/functions/placex_triggers.sql

index d6ae88384f462c41bf58e2d6052b70db62b4cfa8..d247651ed490779cdb3b13a8534c483d884e618b 100644 (file)
@@ -226,7 +226,7 @@ BEGIN
         AND placex.rank_address = bnd.rank_address
         AND placex.osm_type = 'N'
         AND placex.rank_search < 26 -- needed to select the right index
-        AND st_covers(geometry, placex.geometry)
+        AND _st_covers(bnd.geometry, placex.geometry)
     LOOP
       --DEBUG: RAISE WARNING 'Found matching place node %', linkedPlacex.osm_id;
       RETURN linked_placex;