mirror of
https://github.com/osm-search/Nominatim.git
synced 2026-02-16 05:18:00 +00:00
move linked place type into linked_place extratags
Using linked_place means that we don't overwrite any place tags on the boundary. This is important when we wanto to use the information for linking.
This commit is contained in:
@@ -202,8 +202,9 @@ BEGIN
|
||||
|
||||
FOR location IN
|
||||
SELECT placex.place_id, osm_type, osm_id, name,
|
||||
CASE WHEN extratags ? 'place' THEN 'place' ELSE class END as class,
|
||||
CASE WHEN extratags ? 'place' THEN extratags->'place' ELSE type END as type,
|
||||
CASE WHEN extratags ? 'place' or extratags ? 'linked_place'
|
||||
THEN 'place' ELSE class END as class,
|
||||
coalesce(extratags->'place', extratags->'linked_place', type) as type,
|
||||
admin_level, fromarea, isaddress,
|
||||
CASE WHEN rank_address = 11 THEN 5 ELSE rank_address END as rank_address,
|
||||
distance, country_code, postcode
|
||||
|
||||
@@ -818,7 +818,7 @@ BEGIN
|
||||
--DEBUG: RAISE WARNING 'Using full index mode for % %', NEW.osm_type, NEW.osm_id;
|
||||
SELECT * INTO location FROM find_linked_place(NEW);
|
||||
IF location.place_id is not null THEN
|
||||
--DEBUG: RAISE WARNING 'Linked %', location;
|
||||
--DEBUG: RAISE WARNING 'Linked %', location;
|
||||
|
||||
-- Use this as the centre point of the geometry
|
||||
NEW.centroid := coalesce(location.centroid,
|
||||
@@ -830,7 +830,7 @@ BEGIN
|
||||
END IF;
|
||||
|
||||
-- merge in extra tags
|
||||
NEW.extratags := hstore(location.class, location.type)
|
||||
NEW.extratags := hstore('linked_' || location.class, location.type)
|
||||
|| coalesce(location.extratags, ''::hstore)
|
||||
|| coalesce(NEW.extratags, ''::hstore);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user