Add POI parcel locker (#1390)

closes #1370 

This PR adds a parcel locker to post class.

Similarly to ATMs from PR #1375 if a name is not present we try to use `brand` or `operator`. Here we also try to add `ref` to the brand or operator since it can disambiguate parcel lockers that are next to each other (which happens).
This commit is contained in:
ttomasz
2022-06-01 09:32:10 +02:00
committed by GitHub
parent 7d52c9a9e5
commit 82b00c1389
8 changed files with 70 additions and 1 deletions

View File

@@ -27,6 +27,18 @@ BEGIN
AND name = ''
AND COALESCE(tags -> 'operator', tags -> 'network') IS NOT NULL;
-- Parcel locker without name
-- use either brand or operator and add ref if present
-- (using name for parcel lockers is discouraged, see osm wiki)
UPDATE osm_poi_point
SET (name, tags) = (
CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref')),
tags || hstore('name', CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref')))
)
WHERE subclass = 'parcel_locker'
AND name = ''
AND COALESCE(tags -> 'brand', tags -> 'operator') IS NOT NULL;
UPDATE osm_poi_point
SET tags = update_tags(tags, geometry)
WHERE COALESCE(tags->'name:latin', tags->'name:nonlatin', tags->'name_int') IS NULL