Skip to content

Commit

Permalink
Moving ford to a new tagging scheme
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Aug 31, 2017
1 parent 89ef164 commit ff687b8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
9 changes: 9 additions & 0 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down
29 changes: 23 additions & 6 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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'))
Expand Down

0 comments on commit ff687b8

Please sign in to comment.