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

@@ -44,6 +44,7 @@ def_poi_mapping_amenity: &poi_mapping_amenity
- pharmacy
- place_of_worship
- police
- parcel_locker
- post_box
- post_office
- prison
@@ -353,6 +354,9 @@ def_poi_fields: &poi_fields
- name: uic_ref
key: uic_ref
type: string
- name: ref
key: ref
type: string
- name: religion
key: religion
type: string
@@ -374,6 +378,9 @@ def_poi_fields: &poi_fields
- name: network
key: network
type: string
- name: brand
key: brand
type: string
def_poi_mapping: &poi_mapping
aerialway: *poi_mapping_aerialway

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -61,7 +61,7 @@ layer:
ice_cream:
subclass: ['chocolate', 'confectionery']
post:
subclass: ['post_box', 'post_office']
subclass: ['post_box', 'post_office', 'parcel_locker']
cafe:
subclass: ['cafe']
school:

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