mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-14 18:37:58 +00:00
always bind addr:place to place instead of street
If an addr:place is given but no addr:street tag, then bind the rank 30 object always to a <=25 object, even when there is none found with the same name.
This commit is contained in:
@@ -92,7 +92,16 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
IF fallback THEN
|
||||
IF ST_Area(bbox) < 0.005 THEN
|
||||
IF addr_street is null and addr_place is not null THEN
|
||||
-- The address is attached to a place we don't know. Find the
|
||||
-- nearest place instead.
|
||||
FOR location IN
|
||||
SELECT place_id FROM getNearFeatures(poi_partition, bbox, 26, '{}'::INTEGER[])
|
||||
ORDER BY rank_address DESC, isguess asc, distance LIMIT 1
|
||||
LOOP
|
||||
parent_place_id := location.place_id;
|
||||
END LOOP;
|
||||
ELSEIF ST_Area(bbox) < 0.005 THEN
|
||||
-- for smaller features get the nearest road
|
||||
SELECT getNearestRoadPlaceId(poi_partition, bbox) INTO parent_place_id;
|
||||
--DEBUG: RAISE WARNING 'Checked for nearest way (%)', parent_place_id;
|
||||
|
||||
Reference in New Issue
Block a user