Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add natural=peninsula labels #4778

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1559,7 +1559,7 @@ Layer:
'construction', 'salt_pond', 'military', 'plant_nursery') THEN landuse END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'cave_entrance') AND way_area IS NULL THEN "natural" END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'glacier', 'tree', 'strait', 'cape')
'grassland', 'scrub', 'beach', 'glacier', 'tree', 'strait', 'cape', 'peninsula')
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,
Expand Down Expand Up @@ -2021,7 +2021,7 @@ Layer:
COALESCE(
'landuse_' || CASE WHEN landuse IN ('forest', 'military', 'farmland') THEN landuse END,
'military_' || CASE WHEN military IN ('danger_area') THEN military END,
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water') THEN "natural" END,
'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'peninsula') THEN "natural" END,
'place_' || CASE WHEN place IN ('island') THEN place END,
'boundary_' || CASE WHEN boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6'))
Expand All @@ -2035,7 +2035,7 @@ Layer:
AND name IS NOT NULL
AND (landuse IN ('forest', 'military', 'farmland')
OR military IN ('danger_area')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water')
OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'peninsula')
OR "place" IN ('island')
OR boundary IN ('aboriginal_lands', 'national_park')
OR (boundary = 'protected_area' AND tags->'protect_class' IN ('1','1a','1b','2','3','4','5','6'))
Expand Down
2 changes: 2 additions & 0 deletions style/amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -1627,6 +1627,8 @@
text-halo-fill: @standard-halo-fill;
}

[feature = 'natural_peninsula'][zoom >= 10][way_pixels > 3000],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This still selects the starting zoom level based on polygon area without providing feedback on the polygon geometry. Based on past experience with natural=bay this would incentivize drawing labeling polygons and we do not want to do that.

[feature = 'natural_peninsula'][zoom >= 16],
[feature = 'place_locality'][zoom >= 16] {
text-name: "[name]";
text-size: 10;
Expand Down