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

Adding different types of towers and masts #2671

Merged
merged 1 commit into from
Mar 13, 2018
Merged
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
72 changes: 64 additions & 8 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -353,11 +353,65 @@
marker-clip: false;
}

[feature = 'man_made_mast'][zoom >= 17] {
marker-file: url('symbols/communications.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
[feature = 'man_made_mast'] {
[zoom >= 15][height > 80],
[zoom >= 16][height > 40],
[zoom >= 17][height > 20],
[zoom >= 18] {
["tower:type" != 'lighting'] {
marker-file: url('symbols/towers/mast.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
}
["tower:type" = 'lighting'][zoom >= 18] {
marker-file: url('symbols/towers/mast_lighting.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
}
["tower:type" = 'communication'] {
marker-file: url('symbols/towers/mast_communications.svg');
}
}
}

[feature = 'man_made_tower']["tower:type" = 'lighting'][zoom >= 18],
[feature = 'man_made_tower']["tower:type" = 'bell_tower'][zoom >= 18],
[feature = 'man_made_tower']["tower:type" != 'lighting']["tower:type" != 'bell_tower'] {
[zoom >= 13][height > 100],
[zoom >= 14][height > 50],
[zoom >= 15][height > 30],
[zoom >= 17] {
marker-file: url('symbols/towers/tower_generic.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
["tower:type" = 'defensive'] {
marker-file: url('symbols/towers/tower_defensive.svg');
}
["tower:type" = 'observation'] {
marker-file: url('symbols/towers/tower_observation.svg');
}
["tower:type" = 'bell_tower'] {
marker-file: url('symbols/towers/bell_tower.svg');
}
["tower:type" = 'lighting'] {
marker-file: url('symbols/towers/tower_lighting.svg');
["tower:construction" = 'lattice'] {
marker-file: url('symbols/towers/tower_lattice_lighting.svg');
}
}
["tower:construction" = 'lattice'] {
marker-file: url('symbols/towers/tower_lattice.svg');
}
["tower:type" = 'communication'] {
marker-file: url('symbols/towers/tower_cantilever_communication.svg');
["tower:construction" = 'lattice'] {
marker-file: url('symbols/towers/tower_lattice_communication.svg');
}
}
}
}

[feature = 'tourism_museum'][zoom >= 16] {
Expand Down Expand Up @@ -583,7 +637,7 @@
}

[feature = 'man_made_water_tower'][zoom >= 17] {
marker-file: url('symbols/water_tower.svg');
marker-file: url('symbols/towers/water_tower.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
Expand Down Expand Up @@ -999,7 +1053,7 @@
}

[feature = 'man_made_lighthouse'][zoom >= 15] {
marker-file: url('symbols/lighthouse.svg');
marker-file: url('symbols/towers/lighthouse.svg');
marker-placement: interior;
marker-clip: false;
marker-fill: @man-made-icon;
Expand Down Expand Up @@ -1407,7 +1461,8 @@
[feature = 'historic_wayside_cross'][zoom >= 17],
[feature = 'historic_wayside_shrine'][zoom >= 17],
[feature = 'natural_cave_entrance'][zoom >= 15],
[feature = 'man_made_mast'][zoom >= 17],
[feature = 'man_made_mast'][zoom >= 18],
[feature = 'man_made_tower'][zoom >= 17],
[feature = 'man_made_water_tower'][zoom >= 17] {
text-name: "[name]";
text-size: @standard-font-size;
Expand All @@ -1423,6 +1478,7 @@
text-dy: 6;
}
[feature = 'man_made_mast'] { text-dy: 10; }
[feature = 'man_made_tower'] { text-dy: 10; }
text-face-name: @standard-font;
text-halo-radius: @standard-halo-radius;
text-halo-fill: @standard-halo-fill;
Expand Down
4 changes: 2 additions & 2 deletions power.mss
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@

#power-towers {
[zoom >= 14] {
marker-file: url('symbols/power_tower_small.svg');
marker-file: url('symbols/towers/power_tower_small.svg');
marker-width: 3;
}
[zoom >= 15] {
marker-file: url('symbols/power_tower.svg');
marker-file: url('symbols/towers/power_tower.svg');
marker-width: 5;
}
[zoom >= 17] {
Expand Down
36 changes: 28 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ Layer:
'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table',
'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
Expand All @@ -1455,10 +1455,20 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
CASE
WHEN man_made IN ('mast', 'tower') THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
END
ELSE NULL
END AS height,
tags->'power_source' as power_source,
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'tower:construction' as "tower:construction",
tags->'tower:type' as "tower:type",
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer',
'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist',
'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet',
Expand All @@ -1478,7 +1488,7 @@ Layer:
OR shop IS NOT NULL
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre',
'fitness_station', 'firepit')
OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
OR man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
OR "natural" IN ('spring')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
OR tags->'memorial' IN ('plaque')
Expand Down Expand Up @@ -1533,7 +1543,7 @@ Layer:
'shop' || CASE WHEN shop IN ('no', 'vacant', 'closed', 'disused', 'empty') OR shop IS NULL THEN NULL ELSE '' END,
'leisure_' || CASE WHEN leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park', 'fitness_centre', 'fitness_station', 'firepit') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
Expand All @@ -1559,10 +1569,20 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
CASE
WHEN man_made IN ('mast', 'tower') THEN
CASE
WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC
ELSE NULL
END
ELSE NULL
END AS height,
tags->'power_source' as power_source,
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'tower:construction' as "tower:construction",
tags->'tower:type' as "tower:type",
CASE WHEN shop IN ('supermarket', 'bag', 'bakery', 'beauty', 'books', 'butcher', 'clothes', 'computer',
'confectionery', 'fashion', 'convenience', 'department_store', 'doityourself', 'hardware', 'fishmonger', 'florist',
'garden_centre', 'hairdresser', 'hifi', 'ice_cream', 'car', 'car_repair', 'bicycle', 'mall', 'pet',
Expand All @@ -1583,7 +1603,7 @@ Layer:
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park', 'fitness_centre', 'fitness_station', 'firepit')
OR barrier IN ('toll_booth')
OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')
OR man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk')
OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine')
OR tags->'memorial' IN ('plaque')
Expand Down Expand Up @@ -1972,7 +1992,7 @@ Layer:
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery', 'religious') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring', 'scree', 'shingle', 'bare_rock', 'sand', 'heath',
'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
Expand Down Expand Up @@ -2011,7 +2031,7 @@ Layer:
OR shop IS NOT NULL
OR leisure IS NOT NULL
OR landuse IS NOT NULL
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area', 'bunker')
Expand Down Expand Up @@ -2115,7 +2135,7 @@ Layer:
'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland',
'greenhouse_horticulture', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill',
'construction', 'military', 'plant_nursery') THEN landuse ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'obelisk', 'works') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'obelisk', 'works') THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('wood', 'peak', 'volcano', 'saddle', 'cave_entrance', 'water', 'mud', 'wetland', 'marsh', 'bay', 'spring',
'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree')
THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -2161,7 +2181,7 @@ Layer:
OR landuse IN ('reservoir', 'basin', 'recreation_ground', 'village_green', 'quarry', 'vineyard', 'orchard', 'cemetery', 'residential',
'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farmland', 'greenhouse_horticulture',
'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'water_tower', 'cross', 'obelisk', 'works')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk', 'works')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR barrier IN ('toll_booth')
Expand Down
20 changes: 0 additions & 20 deletions symbols/communications.svg

This file was deleted.

54 changes: 54 additions & 0 deletions symbols/towers/bell_tower.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
37 changes: 37 additions & 0 deletions symbols/towers/mast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading