Merge pull request #2090 from lonvia/avoid-contains-operator

avoid contains operator for geometries
This commit is contained in:
Sarah Hoffmann
2020-12-03 09:39:50 +01:00
committed by GitHub

View File

@@ -97,7 +97,7 @@ BEGIN
-- Instead simply use the containing area with the largest rank.
FOR location IN
SELECT place_id FROM placex
WHERE bbox @ geometry AND _ST_Covers(geometry, ST_Centroid(bbox))
WHERE bbox && geometry AND _ST_Covers(geometry, ST_Centroid(bbox))
AND rank_address between 5 and 25
ORDER BY rank_address desc
LOOP
@@ -112,7 +112,7 @@ BEGIN
-- contains the bbox, only use addressable features
FOR location IN
SELECT place_id FROM placex
WHERE bbox @ geometry AND _ST_Covers(geometry, ST_Centroid(bbox))
WHERE bbox && geometry AND _ST_Covers(geometry, ST_Centroid(bbox))
AND rank_address between 5 and 25
ORDER BY rank_address desc
LOOP