From 1f129c418490e58f1c3324ce922bf5f436649879 Mon Sep 17 00:00:00 2001 From: jirik Date: Wed, 8 Nov 2017 16:57:28 +0100 Subject: [PATCH] Add subclass of paths in transportation --- layers/transportation/layer.sql | 3 +++ layers/transportation/transportation.yaml | 14 ++++++++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/layers/transportation/layer.sql b/layers/transportation/layer.sql index bbec2b70..154d0753 100644 --- a/layers/transportation/layer.sql +++ b/layers/transportation/layer.sql @@ -18,6 +18,9 @@ ramp int, oneway int, brunnel TEXT, service TEXT) AS $$ END AS class, CASE WHEN railway IS NOT NULL THEN railway + WHEN (highway IS NOT NULL OR public_transport IS NOT NULL) + AND highway_class(highway, public_transport) = 'path' + THEN COALESCE(NULLIF(public_transport, ''), highway) ELSE NULL END AS subclass, -- All links are considered as ramps as well diff --git a/layers/transportation/transportation.yaml b/layers/transportation/transportation.yaml index cfc9386d..f41dd65d 100644 --- a/layers/transportation/transportation.yaml +++ b/layers/transportation/transportation.yaml @@ -38,9 +38,11 @@ layer: - ferry subclass: description: | - Distinguish more specific railway classes: + Distinguish more specific classes of railway and path: Subclass is value of the - [`railway`](http://wiki.openstreetmap.org/wiki/Key:railway) tag. + [`railway`](http://wiki.openstreetmap.org/wiki/Key:railway), + [`highway`](http://wiki.openstreetmap.org/wiki/Key:highway) (for paths), or + [`public_transport`](http://wiki.openstreetmap.org/wiki/Key:public_transport) (for platforms) tag. values: - rail - narrow_gauge @@ -50,6 +52,14 @@ layer: - light_rail - monorail - tram + - pedestrian + - path + - footway + - cycleway + - steps + - bridleway + - corridor + - platform brunnel: description: | Mark whether way is a tunnel or bridge.