From 7a35d4ee42efbf26fb8a1d9b4554fcc51fd35dda Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Fri, 7 Apr 2023 22:50:47 -0400 Subject: [PATCH] Add cuisine --- layers/poi/mapping.yaml | 14 +++++++++++++- layers/poi/poi.sql | 2 ++ layers/poi/poi.yaml | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/layers/poi/mapping.yaml b/layers/poi/mapping.yaml index 78166973..1ee1994b 100644 --- a/layers/poi/mapping.yaml +++ b/layers/poi/mapping.yaml @@ -1,4 +1,3 @@ - # imposm3 mapping file for https://github.com/osm2vectortiles/imposm3 # Warning: this is not the official imposm3 @@ -75,6 +74,15 @@ def_poi_mapping_barrier: &poi_mapping_barrier - stile - toll_booth +# cuisine values , see http://taginfo.openstreetmap.org/keys/cuisine#values +def_poi_mapping_cuisine: &poi_mapping_cuisine + - burger + - coffee_shop + - donut;coffee_shop + - ice_cream + - pizza + - pizza;italian + # building values , see http://taginfo.openstreetmap.org/keys/building#values def_poi_mapping_building: &poi_mapping_building - dormitory @@ -383,11 +391,15 @@ def_poi_fields: &poi_fields - name: brand key: brand type: string + - name: cuisine + key: cuisine + type: string def_poi_mapping: &poi_mapping aerialway: *poi_mapping_aerialway amenity: *poi_mapping_amenity barrier: *poi_mapping_barrier + cuisine: *poi_mapping_cuisine building: *poi_mapping_building highway: *poi_mapping_highway historic: *poi_mapping_historic diff --git a/layers/poi/poi.sql b/layers/poi/poi.sql index 53f5d036..6d65ae1d 100644 --- a/layers/poi/poi.sql +++ b/layers/poi/poi.sql @@ -32,6 +32,8 @@ SELECT osm_id_hash AS osm_id, THEN NULLIF(information, '') WHEN subclass = 'place_of_worship' THEN NULLIF(religion, '') + WHEN subclass IN ('fast_food', 'restaurant') + THEN NULLIF(cuisine, '') WHEN subclass = 'pitch' THEN NULLIF(sport, '') ELSE subclass diff --git a/layers/poi/poi.yaml b/layers/poi/poi.yaml index 0181ab6c..044e4dcf 100644 --- a/layers/poi/poi.yaml +++ b/layers/poi/poi.yaml @@ -101,6 +101,7 @@ layer: Original value of either the [`amenity`](http://wiki.openstreetmap.org/wiki/Key:amenity), [`barrier`](http://wiki.openstreetmap.org/wiki/Key:barrier), + [`cuisine`](http://wiki.openstreetmap.org/wiki/Key:cuisine), [`historic`](http://wiki.openstreetmap.org/wiki/Key:historic), [`information`](http://wiki.openstreetmap.org/wiki/Key:information), [`landuse`](http://wiki.openstreetmap.org/wiki/Key:landuse),