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

@@ -170,6 +170,20 @@ BEGIN
INSERT INTO omt_test_failures VALUES(600, 'import', 'osm_poi_point atm with name "OpenMapTiles ATM" expected 3, got ' || cnt);
END IF;
-- verify that parcel lockers are imported with correct name which can come from tags like brand or operator and can contain ref
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'parcel_locker'
AND tags->'name' like 'OpenMapTiles Parcel Locker%';
IF cnt <> 3 THEN
INSERT INTO omt_test_failures VALUES(600, 'import', 'osm_poi_point parcel_locker with name like "OpenMapTiles Parcel Locker%" expected 3, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'parcel_locker'
AND tags->'name' like 'OpenMapTiles Parcel Locker PL00%';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'import', 'osm_poi_point parcel_locker with name like "OpenMapTiles Parcel Locker PL00%" expected 1, got ' || cnt);
END IF;
END;
$$