From 8d434cbc061dde7aae0c5e98777d9763b797eae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ko=C4=87?= Date: Tue, 4 Jul 2017 22:08:08 +0200 Subject: [PATCH] Adding diferent types of towers --- amenity-points.mss | 41 +++++++++++++++++++--- project.mml | 22 +++++++----- symbols/mast.svg | 37 +++++++++++++++++++ symbols/mast_communications.svg | 37 +++++++++++++++++++ symbols/tower_basic.svg | 37 +++++++++++++++++++ symbols/tower_cantilever.svg | 37 +++++++++++++++++++ symbols/tower_cantilever_communication.svg | 37 +++++++++++++++++++ symbols/tower_lattice.svg | 37 +++++++++++++++++++ symbols/tower_lattice_communication.svg | 37 +++++++++++++++++++ 9 files changed, 309 insertions(+), 13 deletions(-) create mode 100644 symbols/mast.svg create mode 100644 symbols/mast_communications.svg create mode 100644 symbols/tower_basic.svg create mode 100644 symbols/tower_cantilever.svg create mode 100644 symbols/tower_cantilever_communication.svg create mode 100644 symbols/tower_lattice.svg create mode 100644 symbols/tower_lattice_communication.svg diff --git a/amenity-points.mss b/amenity-points.mss index 85798a9b52..849bfd2102 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -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; @@ -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; @@ -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; diff --git a/project.mml b/project.mml index deb63a09f8..ae7adb6fbf 100644 --- a/project.mml +++ b/project.mml @@ -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, @@ -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', @@ -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') @@ -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, @@ -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', @@ -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') @@ -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, @@ -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') @@ -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, @@ -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') diff --git a/symbols/mast.svg b/symbols/mast.svg new file mode 100644 index 0000000000..95d298e59f --- /dev/null +++ b/symbols/mast.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/mast_communications.svg b/symbols/mast_communications.svg new file mode 100644 index 0000000000..b67630f49d --- /dev/null +++ b/symbols/mast_communications.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tower_basic.svg b/symbols/tower_basic.svg new file mode 100644 index 0000000000..e7db52ff2a --- /dev/null +++ b/symbols/tower_basic.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tower_cantilever.svg b/symbols/tower_cantilever.svg new file mode 100644 index 0000000000..e7db52ff2a --- /dev/null +++ b/symbols/tower_cantilever.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tower_cantilever_communication.svg b/symbols/tower_cantilever_communication.svg new file mode 100644 index 0000000000..56b0d1da79 --- /dev/null +++ b/symbols/tower_cantilever_communication.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tower_lattice.svg b/symbols/tower_lattice.svg new file mode 100644 index 0000000000..625264ecd0 --- /dev/null +++ b/symbols/tower_lattice.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + + diff --git a/symbols/tower_lattice_communication.svg b/symbols/tower_lattice_communication.svg new file mode 100644 index 0000000000..3ff955591b --- /dev/null +++ b/symbols/tower_lattice_communication.svg @@ -0,0 +1,37 @@ + + + + + + image/svg+xml + + + + + + + + +