Skip to content

Commit

Permalink
Merge pull request #4121 from hiddewie/moutain-pass
Browse files Browse the repository at this point in the history
Add rendering for mountain_pass
  • Loading branch information
pnorman authored Jun 11, 2022
2 parents df725e4 + 9aba828 commit 17113f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 5 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,8 @@ Layer:
WHEN (tags ? 'ele') AND tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$'
AND ("natural" IN ('peak', 'volcano', 'saddle')
OR tourism = 'alpine_hut' OR (tourism = 'information' AND tags->'information' = 'guidepost')
OR amenity = 'shelter')
OR amenity = 'shelter'
OR tags->'mountain_pass' = 'yes')
THEN CONCAT(REPLACE(ROUND((tags->'ele')::NUMERIC)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') END,
CASE
WHEN (tags ? 'height') AND tags->'height' ~ '^\d{1,3}(\.\d+)?$'
Expand Down Expand Up @@ -1529,6 +1530,7 @@ Layer:
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'glacier', 'tree', 'strait', 'cape')
THEN "natural" END,
'mountain_pass' || CASE WHEN tags->'mountain_pass' IN ('yes') THEN '' END, -- after natural=saddle to give priority to that tag on the same node
'waterway_' || CASE WHEN "waterway" IN ('waterfall') AND way_area IS NULL THEN waterway END,
'place_' || CASE WHEN place IN ('island', 'islet', 'square') THEN place END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
Expand Down Expand Up @@ -1557,7 +1559,8 @@ Layer:
) AS feature,
access,
CASE
WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN
WHEN "natural" IN ('peak', 'volcano', 'saddle')
OR tags->'mountain_pass' = 'yes' THEN
CASE
WHEN tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'ele')::NUMERIC
END
Expand Down
8 changes: 8 additions & 0 deletions style/amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1382,6 +1382,12 @@
marker-clip: false;
}

[feature = 'mountain_pass'][zoom >= 15] {
marker-file: url('symbols/natural/saddle.svg');
marker-fill: @transportation-icon;
marker-clip: false;
}

[feature = 'natural_spring'][zoom >= 14] {
marker-file: url('symbols/natural/spring.svg');
marker-fill: #7abcec;
Expand Down Expand Up @@ -1833,13 +1839,15 @@
[feature = 'natural_peak'][zoom >= 13],
[feature = 'natural_volcano'][zoom >= 13],
[feature = 'natural_saddle'][zoom >= 15],
[feature = 'mountain_pass'][zoom >= 15],
[feature = 'tourism_viewpoint'][zoom >= 16] {
text-name: "[name]";
text-size: @standard-font-size;
text-wrap-width: @standard-wrap-width;
text-line-spacing: @standard-line-spacing-size;
text-fill: darken(@landform-color, 30%);
[feature = 'natural_volcano'] { text-fill: #d40000; }
[feature = 'mountain_pass'] { text-fill: @transportation-text; }
text-dy: 7;
[feature = 'tourism_viewpoint'] { text-dy: 11; }
text-face-name: @standard-font;
Expand Down

0 comments on commit 17113f7

Please sign in to comment.