mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-03-07 18:44:07 +00:00
parents for large POIs must be address features
There are a couple of places with a search rank < 25 which are not addressable like waterways and islands. We don't want them to function as parents for POI-level objects. So use the address rank for finding parents, not the search rank. See #1815.
This commit is contained in:
@@ -99,12 +99,12 @@ BEGIN
|
|||||||
--DEBUG: RAISE WARNING 'Checked for nearest way (%)', parent_place_id;
|
--DEBUG: RAISE WARNING 'Checked for nearest way (%)', parent_place_id;
|
||||||
ELSE
|
ELSE
|
||||||
-- for larger features simply find the area with the largest rank that
|
-- for larger features simply find the area with the largest rank that
|
||||||
-- contains the bbox
|
-- contains the bbox, only use addressable features
|
||||||
FOR location IN
|
FOR location IN
|
||||||
SELECT place_id FROM placex
|
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_search between 5 and 25
|
AND rank_address between 5 and 25
|
||||||
ORDER BY rank_search desc
|
ORDER BY rank_address desc
|
||||||
LOOP
|
LOOP
|
||||||
RETURN location.place_id;
|
RETURN location.place_id;
|
||||||
END LOOP;
|
END LOOP;
|
||||||
|
|||||||
Reference in New Issue
Block a user