Merge remote-tracking branch 'github/master' into merge-gh-2025

# Conflicts:
#	layers/boundary/mapping.yaml
#	layers/mountain_peak/style.json
#	layers/place/style.json
#	layers/poi/poi.yaml
This commit is contained in:
2025-06-10 21:05:25 +02:00
84 changed files with 1714 additions and 874 deletions

View File

@@ -76,6 +76,8 @@ CREATE OR REPLACE FUNCTION poi_class(subclass text, mapping_key text, subtype te
RETURNS text AS
$$
SELECT CASE
-- Special case subclass collision between office=university and amenity=university
WHEN mapping_key = 'amenity' AND subclass = 'university' THEN 'college'
%%FIELD_MAPPING: class %%
ELSE subclass
END;

View File

@@ -18,6 +18,7 @@ def_poi_mapping_amenity: &poi_mapping_amenity
- biergarten
- bus_station
- cafe
- charging_station
- cinema
- clinic
- college
@@ -124,7 +125,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
@@ -199,6 +259,7 @@ def_poi_mapping_shop: &poi_mapping_shop
- newsagent
- optician
- outdoor
- paint
- perfume
- perfumery
- pet

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.7 MiB

View File

@@ -116,7 +116,7 @@ FROM (
ELSE osm_id * 10 + 1
END AS osm_id_hash
FROM osm_poi_polygon
WHERE geometry && bbox AND
WHERE zoom_level > 9 AND geometry && bbox AND
CASE
WHEN zoom_level >= 14 THEN TRUE
WHEN zoom_level >= 12 AND

View File

@@ -6,9 +6,9 @@ layer:
buffer_size: 64
srs: +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over
fields:
name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the POI.
name_en: English name `name:en` if available, otherwise `name`.
name_de: German name `name:de` if available, otherwise `name` or `name:en`.
name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the POI. Language-specific values are in `name:xx`.
name_en: English name `name:en` if available, otherwise `name`. This is deprecated and will be removed in a future release in favor of `name:en`.
name_de: German name `name:de` if available, otherwise `name` or `name:en`. This is deprecated and will be removed in a future release in favor of `name:de`.
class:
description: |
More general classes of POIs. If there is no more general `class` for the `subclass`
@@ -17,40 +17,50 @@ layer:
and `kindergarten`. Or use the class `shop` to style all shops.
values:
shop:
subclass: ['accessories', 'antiques', 'beauty', 'bed', 'boutique', 'camera', 'carpet', 'charity', 'chemist',
'coffee', 'computer', 'convenience', 'copyshop', 'cosmetics', 'garden_centre', 'doityourself',
subclass: ['accessories', 'antiques', 'beauty', 'bed', 'boutique', 'camera', 'carpet', 'charity', 'chemist', 'chocolate',
'coffee', 'computer', 'convenience', 'confectionery', 'copyshop', 'cosmetics', 'garden_centre', 'doityourself',
'erotic', 'electronics', 'fabric', 'florist', 'frozen_food', 'furniture', 'video_games', 'video',
'general', 'gift', 'hardware', 'hearing_aids', 'hifi', 'ice_cream', 'interior_decoration',
'jewelry', 'kiosk', 'locksmith', 'lamps', 'mall', 'massage', 'motorcycle', 'mobile_phone',
'newsagent', 'optician', 'outdoor', 'perfumery', 'perfume', 'pet', 'photo', 'second_hand', 'shoes', 'sports',
'newsagent', 'optician', 'outdoor', 'paint', 'perfumery', 'perfume', 'pet', 'photo', 'second_hand', 'shoes', 'sports',
'stationery', 'tailor', 'tattoo', 'ticket', 'tobacco', 'toys', 'travel_agency',
'watches', 'weapons', 'wholesale' ]
optician:
subclass: [ 'optician' ]
toys:
subclass: [ 'toys' ]
jewelry:
subclass: [ 'jewelry' ]
furniture:
subclass: [ 'furniture' ]
newsagent:
subclass: [ 'newsagent' ]
paint:
subclass: [ 'paint' ]
beverages:
subclass: [ 'beverages' ]
electronics:
subclass: [ 'electronics' ]
garden_centre:
subclass: [ 'garden_centre' ]
mobile_phone:
subclass: [ 'mobile_phone' ]
shoes:
subclass: [ 'shoes' ]
hardware:
subclass: [ 'hardware', 'doityourself' ]
florist:
subclass: [ 'florist' ]
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']
# optician:
# subclass: [ 'optician' ]
# toys:
# subclass: [ 'toys' ]
# jewelry:
# subclass: [ 'jewelry' ]
# furniture:
# subclass: [ 'furniture' ]
# newsagent:
# subclass: [ 'newsagent' ]
# paint:
# subclass: [ 'paint' ]
# beverages:
# subclass: [ 'beverages' ]
# electronics:
# subclass: [ 'electronics' ]
# garden_centre:
# subclass: [ 'garden_centre' ]
# mobile_phone:
# subclass: [ 'mobile_phone' ]
# shoes:
# subclass: [ 'shoes' ]
# hardware:
# subclass: [ 'hardware', 'doityourself' ]
# florist:
# subclass: [ 'florist' ]
town_hall:
subclass: ['townhall', 'public_building', 'courthouse']
community_centre:
@@ -87,7 +97,7 @@ layer:
lodging:
subclass: ['hotel', 'motel', 'bed_and_breakfast', 'guest_house', 'hostel', 'chalet', 'alpine_hut', 'dormitory']
ice_cream:
subclass: ['chocolate', 'confectionery', 'ice_cream']
subclass: ['ice_cream', 'ice_cream']
post:
subclass: ['post_box', 'post_office', 'parcel_locker']
cafe:
@@ -130,6 +140,8 @@ layer:
subclass: ['castle', 'ruins']
atm:
subclass: ['atm']
fuel:
subclass: ['fuel', 'charging_station']
airport:
subclass: [ 'aerodrome' ]
heliport:

View File

@@ -22,7 +22,37 @@
]
]
},
"icon-image": "{subclass}",
"icon-image": [
"coalesce",
[
"image",
[
"match",
[
"get",
"subclass"
],
"chocolate",
"confectionery",
"wine",
"alcohol",
"kiosk",
"newsagent",
"perfume",
"perfumery",
"wholesale",
"trade",
[
"get",
"subclass"
]
]
],
[
"image",
"shop"
]
],
"text-field": "{name:latin}\n{name:nonlatin}",
"visibility": "visible",
"text-anchor": "top",
@@ -35,16 +65,7 @@
"icon-allow-overlap": true
},
"paint": {
"text-color": [
"match",
[
"get",
"class"
],
"ice_cream",
"#C77400",
"#939"
],
"text-color": "#939",
"icon-opacity": 1,
"icon-halo-blur": 1,
"text-halo-blur": 0.5,
@@ -72,7 +93,9 @@
"subclass",
"mall",
"library",
"artwork"
"artwork",
"arts_centre",
"gallery"
]
],
"order": 150
@@ -99,7 +122,19 @@
]
]
},
"icon-image": "{subclass}",
"icon-image": [
"match",
[
"get",
"subclass"
],
"chocolate",
"confectionery",
[
"get",
"subclass"
]
],
"text-field": "{name:latin}\n{name:nonlatin}",
"visibility": "visible",
"text-anchor": "top",
@@ -112,16 +147,7 @@
"icon-allow-overlap": true
},
"paint": {
"text-color": [
"match",
[
"get",
"class"
],
"ice_cream",
"#C77400",
"#939"
],
"text-color": "#939",
"icon-opacity": 1,
"icon-halo-blur": 1,
"text-halo-blur": 0.5,
@@ -743,7 +769,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 +824,8 @@
"information",
"cinema",
"theatre",
"fire_station"
"fire_station",
"office"
],
[
"!=",
@@ -840,7 +887,6 @@
"class",
"cinema",
"library",
"music",
"museum",
"castle",
"monument",
@@ -850,9 +896,7 @@
"!in",
"subclass",
"books",
"musical_instrument",
"art",
"gallery"
"art"
]
],
"order": 163
@@ -976,7 +1020,8 @@
"class",
"car",
"bicycle_parking",
"fuel"
"fuel",
"charging_station"
]
],
"order": 165

View File

@@ -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;
@@ -155,12 +155,14 @@ CREATE TRIGGER trigger_store
AFTER INSERT OR UPDATE
ON osm_poi_point
FOR EACH ROW
WHEN (pg_trigger_depth() < 1)
EXECUTE PROCEDURE poi_point.store();
CREATE TRIGGER trigger_flag
AFTER INSERT OR UPDATE
ON osm_poi_point
FOR EACH STATEMENT
WHEN (pg_trigger_depth() < 1)
EXECUTE PROCEDURE poi_point.flag();
CREATE CONSTRAINT TRIGGER trigger_refresh

View File

@@ -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))
@@ -96,12 +109,14 @@ CREATE TRIGGER trigger_store
AFTER INSERT OR UPDATE
ON osm_poi_polygon
FOR EACH ROW
WHEN (pg_trigger_depth() < 1)
EXECUTE PROCEDURE poi_polygon.store();
CREATE TRIGGER trigger_flag
AFTER INSERT OR UPDATE
ON osm_poi_polygon
FOR EACH STATEMENT
WHEN (pg_trigger_depth() < 1)
EXECUTE PROCEDURE poi_polygon.flag();
CREATE CONSTRAINT TRIGGER trigger_refresh