From b9c9e69028d54ac5fd7694deed7eb6d8b5e4aa3e Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 28 Dec 2023 01:11:36 -0500 Subject: [PATCH 1/3] Remove expressway from ramps (#1602) #1313 added `expressway` tagging to the transportation layer. However, this also added the `expressway` attributes to ramps where it doesn't make sense (ramps by definition are controlled-access roads in all cases). This PR corrects this by dropping the `expressway` attribute from ramps where it doesn't make sense to do so. See also ZeLonewolf/openstreetmap-americana#1017 --- layers/transportation/transportation.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/transportation/transportation.sql b/layers/transportation/transportation.sql index 85d25220..54c734c6 100644 --- a/layers/transportation/transportation.sql +++ b/layers/transportation/transportation.sql @@ -62,7 +62,7 @@ SELECT osm_id, NULLIF(service, '') AS service, access, CASE WHEN toll = TRUE THEN 1 END AS toll, - CASE WHEN highway NOT IN ('', 'motorway') AND expressway = TRUE THEN 1 END AS expressway, + CASE WHEN highway NOT IN ('', 'motorway') AND NOT is_ramp AND expressway = TRUE THEN 1 END AS expressway, NULLIF(layer, 0) AS layer, "level", CASE WHEN indoor = TRUE THEN 1 END AS indoor, From d3a9b368739f0b5d4153c99f44d424cef8817687 Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Thu, 28 Dec 2023 02:18:00 -0500 Subject: [PATCH 2/3] Fix university office/amenity collision (#1607) Fixes #1606 Unblocks ZeLonewolf/openstreetmap-americana#1022 This PR is a bugfix which ensures that `amenity=university` is encoded as `class=college` rather than `class=office`. It's required because of a subclass collision for `university`, which exists under both class values. --- layers/poi/class.sql | 2 ++ 1 file changed, 2 insertions(+) diff --git a/layers/poi/class.sql b/layers/poi/class.sql index a36fbdfa..0f4323bc 100644 --- a/layers/poi/class.sql +++ b/layers/poi/class.sql @@ -33,6 +33,8 @@ CREATE OR REPLACE FUNCTION poi_class(subclass text, mapping_key text) 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; From a682d50d0d6e5857a0295a4f1f629baf85e393fc Mon Sep 17 00:00:00 2001 From: Brian Sperlongano Date: Sat, 30 Dec 2023 02:14:35 -0500 Subject: [PATCH 3/3] Document name_* deprecation strategy (#1605) This PR is a **documentation change only**. It documents the fact that `name:xx` values are present in the tiles and documents that `name_de` and `name_en` will be removed in a future release in favor of `name:de` and `name:en` respectively. --- layers/aerodrome_label/aerodrome_label.yaml | 6 +++--- layers/mountain_peak/mountain_peak.yaml | 4 ++-- layers/park/park.yaml | 6 +++--- layers/place/place.yaml | 6 +++--- layers/poi/poi.yaml | 6 +++--- layers/transportation_name/transportation_name.yaml | 4 ++-- layers/water_name/water_name.yaml | 6 +++--- layers/waterway/waterway.yaml | 6 +++--- 8 files changed, 22 insertions(+), 22 deletions(-) diff --git a/layers/aerodrome_label/aerodrome_label.yaml b/layers/aerodrome_label/aerodrome_label.yaml index 3a48cf6b..47893d4f 100644 --- a/layers/aerodrome_label/aerodrome_label.yaml +++ b/layers/aerodrome_label/aerodrome_label.yaml @@ -5,9 +5,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 aerodrome. - 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 aerodrome. 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: | Distinguish between more and less important aerodromes. diff --git a/layers/mountain_peak/mountain_peak.yaml b/layers/mountain_peak/mountain_peak.yaml index a7c52db8..c7cb8ab2 100644 --- a/layers/mountain_peak/mountain_peak.yaml +++ b/layers/mountain_peak/mountain_peak.yaml @@ -8,8 +8,8 @@ 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 peak. - name_en: English name `name:en` if available, otherwise `name`. + name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the peak. 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`. class: description: | diff --git a/layers/park/park.yaml b/layers/park/park.yaml index 8b2e498c..1ae0543a 100644 --- a/layers/park/park.yaml +++ b/layers/park/park.yaml @@ -22,9 +22,9 @@ layer: The class for other [`protection_title`](http://wiki.openstreetmap.org/wiki/key:protection_title) values is similarly assigned. The class for `boundary=aboriginal_lands` is `aboriginal_lands`. - name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the park (point features only). - name_en: English name `name:en` if available, otherwise `name` (point features only). - name_de: German name `name:de` if available, otherwise `name` or `name:en` (point features only). + name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the park (point features only). Language-specific values are in `name:xx`. + name_en: English name `name:en` if available, otherwise `name` (point features only). 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` (point features only). This is deprecated and will be removed in a future release in favor of `name:de`. rank: Rank of the park within one tile, starting at 1 that is the most important park (point features only). datasource: geometry_field: geometry diff --git a/layers/place/place.yaml b/layers/place/place.yaml index aba01f28..e4d5a57c 100644 --- a/layers/place/place.yaml +++ b/layers/place/place.yaml @@ -12,9 +12,9 @@ layer: Apart from the roads this is also one of the more important layers to create a beautiful map. We suggest you use different font styles and sizes to create a text hierarchy. 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 place. 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`. capital: description: | The **capital** field marks the diff --git a/layers/poi/poi.yaml b/layers/poi/poi.yaml index 937292a8..28fcaced 100644 --- a/layers/poi/poi.yaml +++ b/layers/poi/poi.yaml @@ -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` diff --git a/layers/transportation_name/transportation_name.yaml b/layers/transportation_name/transportation_name.yaml index a5e9266b..ad664f9e 100644 --- a/layers/transportation_name/transportation_name.yaml +++ b/layers/transportation_name/transportation_name.yaml @@ -13,8 +13,8 @@ layer: 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/Highways#Names_and_references) value of the highway. - name_en: English name `name:en` if available, otherwise `name`. - name_de: German name `name:de` if available, otherwise `name` or `name:en`. + 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`. ref: The OSM [`ref`](http://wiki.openstreetmap.org/wiki/Key:ref) tag of the motorway or its network. ref_length: Length of the `ref` field. Useful for having a shield icon as background for labeling motorways. network: diff --git a/layers/water_name/water_name.yaml b/layers/water_name/water_name.yaml index 89b6098e..4162dd31 100644 --- a/layers/water_name/water_name.yaml +++ b/layers/water_name/water_name.yaml @@ -9,9 +9,9 @@ layer: This is based of the [osm-lakelines](https://github.com/openmaptiles/osm-lakelines) project which derives nice centerlines from OSM water bodies. Only the most important lakes contain labels. fields: - name: The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the water body. - 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 water body. 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: | Distinguish between `lake`, `ocean`, `bay`, `strait`, and `sea`. diff --git a/layers/waterway/waterway.yaml b/layers/waterway/waterway.yaml index 53ec3bce..d3440852 100644 --- a/layers/waterway/waterway.yaml +++ b/layers/waterway/waterway.yaml @@ -18,10 +18,10 @@ layer: buffer_size: 4 fields: name: | - The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the waterway. + The OSM [`name`](http://wiki.openstreetmap.org/wiki/Key:name) value of the waterway. Language-specific values are in `name:xx`. The `name` field may be empty for NaturalEarth data or at lower zoom levels. - name_en: English name `name:en` if available, otherwise `name`. - name_de: German name `name:de` if available, otherwise `name` or `name:en`. + 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: | The original value of the [`waterway`](http://wiki.openstreetmap.org/wiki/Key:waterway) tag.