From ff687b80b3f1e242c6acc2deacdd2546fce8aa0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Thu, 31 Aug 2017 02:33:27 +0200 Subject: [PATCH] Moving ford to a new tagging scheme --- amenity-points.mss | 9 +++++++++ project.mml | 29 +++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index f12122cb3c..45eff59778 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -138,6 +138,7 @@ marker-clip: false; } + // Ford tagging on points - ford on lines is defined later [feature = 'highway_ford'][zoom >= 16] { marker-file: url('symbols/ford.svg'); marker-fill: @transportation-icon; @@ -2191,6 +2192,14 @@ } } +#amenity-line { + // Ford tagging on ways + [feature = 'highway_ford'][zoom >= 16] { + marker-file: url('symbols/ford.svg'); + marker-fill: @transportation-icon; + } +} + #trees [zoom >= 16] { ::canopy { opacity: 0.3; diff --git a/project.mml b/project.mml index 9ce3d9b735..20db4e27c0 100644 --- a/project.mml +++ b/project.mml @@ -1445,6 +1445,21 @@ Layer: ) AS amenity_points_poly properties: minzoom: 10 + - id: amenity-line + geometry: linestring + <<: *extents + Datasource: + <<: *osm2pgsql + table: |- + (SELECT + way, + COALESCE( + 'highway_' || CASE WHEN tags->'ford' IN ('yes', 'stepping_stones') THEN 'ford' ELSE NULL END + ) AS feature + FROM planet_osm_line + ) AS amenity_line + properties: + minzoom: 16 - id: amenity-points class: points geometry: point @@ -1474,7 +1489,8 @@ Layer: 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) ELSE NULL END, - 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END, + 'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway + WHEN tags->'ford' IN ('yes', 'stepping_stones') THEN 'ford' ELSE NULL END, 'power_' || CASE WHEN power IN ('generator') THEN power ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint') THEN tourism ELSE NULL END, 'man_made_' || CASE WHEN man_made IN ('cross') THEN man_made ELSE NULL END, @@ -1525,7 +1541,8 @@ Layer: OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') OR tags->'memorial' IN ('plaque') - OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') + OR highway IN ('bus_stop', 'elevator', 'traffic_signals') + OR tags->'ford' IN ('yes', 'stepping_stones') OR (power = 'generator' AND (tags @> '"generator:source"=>wind' OR tags @> 'power_source=>wind')) ORDER BY score DESC NULLS LAST ) AS amenity_points @@ -1910,7 +1927,7 @@ Layer: 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) ELSE NULL END, - 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, + 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END, 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam') THEN waterway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END @@ -1938,7 +1955,7 @@ Layer: OR military IN ('danger_area') OR historic IN ('memorial', 'monument', 'archaeological_site') OR tags->'memorial' IN ('plaque') - OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') + OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator') OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') OR boundary IN ('national_park') OR waterway = 'dam') @@ -2043,7 +2060,7 @@ Layer: 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site') THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) ELSE NULL END, - 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator', 'ford') THEN highway ELSE NULL END, + 'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END, 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'waterway_' || CASE WHEN waterway IN ('dam', 'weir') THEN waterway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('viewpoint', 'attraction') THEN tourism ELSE NULL END, @@ -2084,7 +2101,7 @@ Layer: OR military IN ('danger_area') OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross') OR tags->'memorial' IN ('plaque') - OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator', 'ford') + OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator') OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation') OR boundary IN ('national_park') OR waterway IN ('dam', 'weir'))