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

@@ -79,6 +79,7 @@ BEGIN
-- Test 600
-- check if name was applied correctly
-- for atm
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'atm'
AND tags->'name' = 'OpenMapTiles ATM';
@@ -91,6 +92,20 @@ BEGIN
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point atm with name "New name" expected 1, got ' || cnt);
END IF;
-- for parcel_locker
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'parcel_locker'
AND tags->'name' like 'OpenMapTiles Parcel Locker%';
IF cnt <> 2 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point atm with name "OpenMapTiles ATM" expected 2, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'parcel_locker'
AND tags->'name' = 'Different operator PL001';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point parcel_locker with name "Different operator PL001" expected 1, got ' || cnt);
END IF;
END;