adds ATM to POI layer (#1375)

This PR adds ATM to POI layer.
If ATM isn't provided with a name tag we'll try to use operator or network instead.
This commit is contained in:
ttomasz
2022-04-25 10:29:08 +02:00
committed by GitHub
parent 2d0b7159d0
commit ca9e8f4e52
8 changed files with 76 additions and 0 deletions

View File

@@ -15,6 +15,18 @@ BEGIN
WHERE funicular = 'yes'
AND subclass = 'station';
-- ATM without name
-- use either operator or network
-- (using name for ATM is discouraged, see osm wiki)
UPDATE osm_poi_point
SET (name, tags) = (
COALESCE(tags -> 'operator', tags -> 'network'),
tags || hstore('name', COALESCE(tags -> 'operator', tags -> 'network'))
)
WHERE subclass = 'atm'
AND name = ''
AND COALESCE(tags -> 'operator', tags -> 'network') 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