Skip to content

Commit

Permalink
Adding diferent types of towers
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Jul 4, 2017
1 parent 536a625 commit 8d434cb
Show file tree
Hide file tree
Showing 9 changed files with 309 additions and 13 deletions.
41 changes: 36 additions & 5 deletions amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,42 @@
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] {
marker-file: url('symbols/mast.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
["tower:type" = 'communication'] {
marker-file: url('symbols/mast_communications.svg');
}
}
}

[feature = 'man_made_tower']{
[zoom >= 13][height > 100],
[zoom >= 14][height > 50],
[zoom >= 15][height > 30],
[zoom >= 17] {
marker-file: url('symbols/tower_basic.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
["tower:type" = 'communication'] {
marker-file: url('symbols/tower_cantilever_communication.svg');
["tower:construction" = 'freestanding'] {
marker-file: url('symbols/tower_cantilever_communication.svg');
}
["tower:construction" = 'lattice'] {
marker-file: url('symbols/tower_lattice_communication.svg');
}
}
}
}

[feature = 'tourism_museum'][zoom >= 16] {
marker-file: url('symbols/museum.svg');
marker-fill: @amenity-brown;
Expand Down Expand Up @@ -1218,6 +1247,7 @@
[feature = 'historic_wayside_cross'][zoom >= 17],
[feature = 'natural_cave_entrance'][zoom >= 15],
[feature = 'man_made_mast'][zoom >= 17],
[feature = 'man_made_tower'][zoom >= 15],
[feature = 'man_made_water_tower'][zoom >= 17] {
text-name: "[name]";
text-size: @standard-text-size;
Expand All @@ -1231,6 +1261,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
22 changes: 14 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1569,7 +1569,7 @@ Layer:
'charging_station', 'arts_centre') THEN amenity ELSE NULL END,
'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') 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') THEN historic ELSE NULL END,
'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals') THEN highway ELSE NULL END,
Expand All @@ -1580,7 +1580,10 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
tags->'height' as height,
tags->'power_source' as power_source,
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 @@ -1606,7 +1609,7 @@ Layer:
'social_facility', 'charging_station', 'arts_centre')
OR shop IS NOT NULL -- skip checking a huge list and use a null check
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table')
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')
OR highway IN ('bus_stop', 'elevator', 'traffic_signals')
Expand Down Expand Up @@ -1639,7 +1642,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') 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') THEN historic ELSE NULL END,
'highway_'|| CASE WHEN highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford') THEN highway ELSE NULL END,
Expand All @@ -1660,7 +1663,10 @@ Layer:
religion,
tags->'denomination' as denomination,
tags->'generator:source' as "generator:source",
tags->'height' as height,
tags->'power_source' as power_source,
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 @@ -1687,7 +1693,7 @@ Layer:
OR shop IS NOT NULL -- skip checking a huge list and use a null check
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'slipway',
'dog_park')
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')
OR highway IN ('bus_stop', 'elevator', 'traffic_signals', 'ford')
Expand Down Expand Up @@ -2024,7 +2030,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', 'pier', 'breakwater', 'groyne', 'obelisk') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk') 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 All @@ -2050,7 +2056,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')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area')
Expand Down Expand Up @@ -2149,7 +2155,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') THEN man_made ELSE NULL END,
'man_made_' || CASE WHEN man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'obelisk') 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 @@ -2189,7 +2195,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')
OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk')
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area')
Expand Down
37 changes: 37 additions & 0 deletions symbols/mast.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions symbols/mast_communications.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions symbols/tower_basic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions symbols/tower_cantilever.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions symbols/tower_cantilever_communication.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
37 changes: 37 additions & 0 deletions symbols/tower_lattice.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8d434cb

Please sign in to comment.