Merge branch 'master' into valley

pull/1589/head
Tomas Pohanka 2023-12-12 14:57:32 +01:00 zatwierdzone przez GitHub
commit 5bf2ca106f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
12 zmienionych plików z 201 dodań i 25 usunięć

Wyświetl plik

@ -18,6 +18,7 @@ def_poi_mapping_amenity: &poi_mapping_amenity
- biergarten
- bus_station
- cafe
- charging_station
- cinema
- clinic
- college
@ -118,7 +119,66 @@ def_poi_mapping_leisure: &poi_mapping_leisure
# office values , see http://taginfo.openstreetmap.org/keys/office#values
def_poi_mapping_office: &poi_mapping_office
- accountant
- advertising_agency
- architect
- association
- bail_bond_agent
- charity
- company
- construction_company
- consulting
- cooperative
- courier
- coworking
- diplomatic
- educational_institution
- employment_agency
- energy_supplier
- engineer
- estate_agent
- financial
- financial_advisor
- forestry
- foundation
- geodesist
- government
- graphic_design
- guide
- harbour_master
- health_insurance
- insurance
- interior_design
- it
- lawyer
- logistics
- marketing
- moving_company
- newspaper
- ngo
- notary
- physician
- political_party
- private_investigator
- property_management
- publisher
- quango
- religion
- research
- security
- surveyor
- tax_advisor
- taxi
- telecommunication
- therapist
- translator
- travel_agent
- tutoring
- union
- university
- water_utility
- web_design
- wedding_planner
# railway values , see http://taginfo.openstreetmap.org/keys/railway#values
def_poi_mapping_railway: &poi_mapping_railway

Plik binarny nie jest wyświetlany.

Przed

Szerokość:  |  Wysokość:  |  Rozmiar: 1.4 MiB

Po

Szerokość:  |  Wysokość:  |  Rozmiar: 1.7 MiB

Wyświetl plik

@ -25,6 +25,16 @@ layer:
'newsagent', 'optician', 'outdoor', 'paint', 'perfumery', 'perfume', 'pet', 'photo', 'second_hand',
'shoes', 'sports', 'stationery', 'tailor', 'tattoo', 'ticket', 'tobacco', 'toys', 'travel_agency',
'watches', 'weapons', 'wholesale']
office:
subclass: ['accountant', 'advertising_agency', 'architect', 'association', 'bail_bond_agent', 'charity',
'company', 'construction_company', 'consulting', 'cooperative', 'courier', 'coworking', 'diplomatic',
'educational_institution', 'employment_agency', 'energy_supplier', 'engineer', 'estate_agent', 'financial',
'financial_advisor', 'forestry', 'foundation', 'geodesist', 'government', 'graphic_design', 'guide',
'harbour_master', 'health_insurance', 'insurance', 'interior_design', 'it', 'lawyer', 'logistics', 'marketing',
'moving_company', 'newspaper', 'ngo', 'notary', 'physician', 'political_party', 'private_investigator',
'property_management', 'publisher', 'quango', 'religion', 'research', 'security', 'surveyor', 'tax_advisor',
'taxi', 'telecommunication', 'therapist', 'translator', 'travel_agent', 'tutoring', 'union', 'university',
'water_utility', 'web_design', 'wedding_planner']
town_hall:
subclass: ['townhall', 'public_building', 'courthouse', 'community_centre']
golf:
@ -96,6 +106,8 @@ layer:
subclass: ['castle', 'ruins']
atm:
subclass: ['atm']
fuel:
subclass: ['fuel', 'charging_station']
subclass:
description: |
Original value of either the

Wyświetl plik

@ -743,7 +743,27 @@
]
]
},
"icon-image": "{subclass}",
"icon-image": [
"coalesce",
[
"image",
[
"get",
"subclass"
]
],
[
"image",
[
"get",
"class"
]
],
[
"image",
""
]
],
"text-field": "{name:latin}\n{name:nonlatin}",
"visibility": "visible",
"text-anchor": "top",
@ -778,7 +798,8 @@
"information",
"cinema",
"theatre",
"fire_station"
"fire_station",
"office"
],
[
"!=",
@ -976,7 +997,8 @@
"class",
"car",
"bicycle_parking",
"fuel"
"fuel",
"charging_station"
]
],
"order": 170

Wyświetl plik

@ -43,11 +43,11 @@ BEGIN
-- (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')))
TRIM(CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref'))),
tags || hstore('name', TRIM(CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref'))))
)
WHERE (full_update OR osm_id IN (SELECT osm_id FROM poi_point.osm_ids))
AND subclass = 'parcel_locker'
AND subclass IN ('parcel_locker', 'charging_station')
AND name = ''
AND COALESCE(tags -> 'brand', tags -> 'operator') IS NOT NULL;

Wyświetl plik

@ -36,6 +36,19 @@ $$
AND funicular = 'yes'
AND subclass = 'station';
-- Parcel locker and charging_station 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_polygon
SET (name, tags) = (
TRIM(CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref'))),
tags || hstore('name', TRIM(CONCAT(COALESCE(tags -> 'brand', tags -> 'operator'), concat(' ', tags -> 'ref'))))
)
WHERE (full_update OR osm_id IN (SELECT osm_id FROM poi_polygon.osm_ids))
AND subclass IN ('parcel_locker', 'charging_station')
AND name = ''
AND COALESCE(tags -> 'brand', tags -> 'operator') IS NOT NULL;
UPDATE osm_poi_polygon
SET tags = update_tags(tags, geometry)
WHERE (full_update OR osm_id IN (SELECT osm_id FROM poi_polygon.osm_ids))

Wyświetl plik

@ -321,7 +321,6 @@ tables:
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage
@ -399,7 +398,6 @@ tables:
- *bridge
- *ramp
- *ford
- *oneway
- *area
- *service
- *usage

Wyświetl plik

@ -483,7 +483,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -518,7 +518,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -553,7 +553,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -589,7 +589,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -625,7 +625,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -659,7 +659,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -692,7 +692,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -725,7 +725,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -758,7 +758,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -791,7 +791,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -824,7 +824,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -857,7 +857,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -890,7 +890,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -923,7 +923,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -956,7 +956,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,
@ -990,7 +990,7 @@ FROM (
is_ford,
NULL::boolean AS expressway,
is_ramp,
is_oneway,
NULL::int AS is_oneway,
NULL AS man_made,
layer,
NULL::int AS level,

Wyświetl plik

@ -28,4 +28,28 @@
<tag k="amenity" v="parcel_locker"/>
<tag k="operator" v="OpenMapTiles Parcel Locker"/>
</node>
<node id="600007" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="35.8" lon="-80.8">
<tag k="amenity" v="charging_station"/>
<tag k="name" v="OpenMapTiles Charging Station"/>
<tag k="brand" v="OpenMapTiles Charging Station Brand"/>
</node>
<node id="600008" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="34.0" lon="-80.0" />
<node id="600009" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="34.1" lon="-80.0" />
<node id="600010" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="34.1" lon="-80.1" />
<node id="600011" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="34.0" lon="-80.1" />
</node>
<node id="6000012" visible="true" timestamp="2019-01-01T00:00:00Z" version="1" lat="35.9" lon="-80.9">
<tag k="amenity" v="charging_station"/>
<tag k="name" v="OpenMapTiles Charging Station"/>
<tag k="operator" v="OpenMapTiles Charging Station Operator"/>
</node>
<way id="6000" timestamp="2019-01-01T00:00:00Z" version="1" visible="true">
<nd ref="600008" />
<nd ref="600009" />
<nd ref="600010" />
<nd ref="600011" />
<nd ref="600008" />
<tag k="amenity" v="charging_station"/>
<tag k="brand" v="OpenMapTiles Charging Station Brand"/>
</way>
</osm>

Wyświetl plik

@ -195,6 +195,20 @@ BEGIN
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;
-- verify that charging stations 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 = 'charging_station'
AND tags->'name' = 'OpenMapTiles Charging Station';
IF cnt <> 2 THEN
INSERT INTO omt_test_failures VALUES(600, 'import', 'osm_poi_point charging_station with name "OpenMapTiles Charging Station" expected 2, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_polygon
WHERE subclass = 'charging_station'
AND tags->'name' = 'OpenMapTiles Charging Station Brand';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'import', 'osm_poi_polygon charging_station with name "OpenMapTiles Charging Station Brand" expected 1, got ' || cnt);
END IF;
END;

Wyświetl plik

@ -98,7 +98,7 @@ BEGIN
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);
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point atm with name "OpenMapTiles Parcel Locker%" expected 2, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'parcel_locker'
@ -107,6 +107,26 @@ BEGIN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point parcel_locker with name "Different operator PL001" expected 1, got ' || cnt);
END IF;
-- for charging_station
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'charging_station'
AND tags->'name' = 'OpenMapTiles Charging Station';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point charging_station with name "OpenMapTiles Charging Station" expected 1, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_point
WHERE subclass = 'charging_station'
AND tags->'name' = 'OpenMapTiles Charging Station Brand';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_point charging_station with name "OpenMapTiles Charging Station Brand" expected 1, got ' || cnt);
END IF;
SELECT COUNT(*) INTO cnt FROM osm_poi_polygon
WHERE subclass = 'charging_station'
AND tags->'name' = 'OpenMapTiles Charging Station';
IF cnt <> 1 THEN
INSERT INTO omt_test_failures VALUES(600, 'update', 'osm_poi_polygon charging_station with name "OpenMapTiles Charging Station" expected 1, got ' || cnt);
END IF;
END;
$$;

Wyświetl plik

@ -15,5 +15,18 @@
<tag k="brand" v="Different operator"/>
<tag k="ref" v="PL001"/>
</node>
<node id="600007" visible="true" timestamp="2020-01-02T00:00:00Z" version="1" lat="35.8" lon="-80.8">
<tag k="amenity" v="charging_station"/>
<tag k="brand" v="OpenMapTiles Charging Station Brand"/>
</node>
<way id="6000" timestamp="2020-01-02T00:00:00Z" version="1" visible="true">
<nd ref="600008" />
<nd ref="600009" />
<nd ref="600010" />
<nd ref="600011" />
<nd ref="600008" />
<tag k="amenity" v="charging_station"/>
<tag k="name" v="OpenMapTiles Charging Station"/>
</way>
</modify>
</osmChange>