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

Update zoom levels by height for masts, towers and telescopes #3536

Merged
merged 6 commits into from
Jan 7, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
73 changes: 41 additions & 32 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@

[feature = 'man_made_mast']["tower:type" != 'lighting'],
[feature = 'man_made_mast']["tower:type" = 'lighting'][zoom >= 18] {
[zoom >= 14][height > 160],
[zoom >= 15][height > 80],
[zoom >= 16][height > 40],
[zoom >= 17][height > 20],
Expand All @@ -494,9 +495,9 @@
[feature = 'man_made_tower']["tower:type" = 'bell_tower'][zoom >= 18],
[feature = 'man_made_tower']["tower:type" = 'watchtower'][zoom >= 18],
[feature = 'man_made_tower']["tower:type" != 'cooling']["tower:type" != 'lighting']["tower:type" != 'bell_tower']["tower:type" != 'watchtower'] {
[zoom >= 13][height > 100],
[zoom >= 14][height > 50],
[zoom >= 15][height > 30],
[zoom >= 14][height > 160],
[zoom >= 15][height > 80],
[zoom >= 16][height > 40],
[zoom >= 17] {
marker-file: url('symbols/man_made/tower_generic.svg');
marker-fill: @man-made-icon;
Expand Down Expand Up @@ -545,7 +546,7 @@
}
}

[feature = 'man_made_communications_tower'][zoom >= 13] {
[feature = 'man_made_communications_tower'][zoom >= 14] {
marker-file: url('symbols/man_made/communications_tower.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
Expand Down Expand Up @@ -574,27 +575,26 @@
}

[feature = 'man_made_telescope']["telescope:type" != 'optical']["telescope:type" != null] {
[zoom >= 13]["telescope:diameter" >= 60],
[zoom >= 14]["telescope:diameter" >= 30],
[zoom >= 15]["telescope:diameter" >= 15],
[zoom >= 16] {
marker-file: url('symbols/man_made/telescope_dish.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
[zoom >= 14]["telescope:diameter" >= 60],
[zoom >= 15]["telescope:diameter" >= 30],
[zoom >= 16] {
marker-file: url('symbols/man_made/telescope_dish.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
}
}

[feature = 'man_made_telescope']["telescope:type" = 'optical'],
[feature = 'man_made_telescope']["telescope:type" = null], {
[zoom >= 14]["telescope:diameter" >= 8],
[zoom >= 15]["telescope:diameter" >= 4],
[zoom >= 16]["telescope:diameter" >= 2],
[zoom >= 17] {
marker-file: url('symbols/man_made/telescope_dome.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
[feature = 'man_made_telescope']["telescope:type" = 'optical'],
[feature = 'man_made_telescope']["telescope:type" = null], {
[zoom >= 14]["telescope:diameter" >= 8],
[zoom >= 15]["telescope:diameter" >= 4],
[zoom >= 16]["telescope:diameter" >= 2],
[zoom >= 17] {
marker-file: url('symbols/man_made/telescope_dome.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
}
}

Expand Down Expand Up @@ -943,18 +943,27 @@
marker-clip: false;
}

[feature = 'man_made_obelisk'][zoom >= 17] {
marker-file: url('symbols/historic/obelisk.svg');
marker-fill: @memorials;
marker-placement: interior;
marker-clip: false;
[feature = 'man_made_obelisk'] {
[zoom >= 14][height > 80],
[zoom >= 15][height > 40],
[zoom >= 16][height > 20],
[zoom >= 17] {
marker-file: url('symbols/historic/obelisk.svg');
marker-fill: @memorials;
marker-placement: interior;
marker-clip: false;
}
}

[feature = 'historic_monument'][zoom >= 16] {
marker-file: url('symbols/historic/monument.svg');
marker-fill: @memorials;
marker-placement: interior;
marker-clip: false;
[feature = 'historic_monument'] {
[zoom >= 14][height > 80],
[zoom >= 15][height > 40],
[zoom >= 16] {
marker-file: url('symbols/historic/monument.svg');
marker-fill: @memorials;
marker-placement: interior;
marker-clip: false;
}
}

[feature = 'historic_fort'][zoom >= 16] {
Expand Down
6 changes: 4 additions & 2 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1490,7 +1490,8 @@ Layer:
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
CASE
WHEN (man_made IN ('mast', 'tower', 'chimney') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN
WHEN (man_made IN ('mast', 'tower', 'chimney', 'obelisk') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR historic IN ('monument') THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
Expand Down Expand Up @@ -1649,7 +1650,8 @@ Layer:
tags->'generator:source' as "generator:source",
CASE
WHEN (man_made IN ('mast', 'tower', 'chimney', 'crane') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR waterway IN ('waterfall') THEN
OR waterway IN ('waterfall')
OR historic IN ('monument') THEN
CASE
WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC
ELSE NULL
Expand Down