Skip to content

Commit

Permalink
Add rendering for man-made cranes (#3501)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeisenbe authored and kocio-pl committed Dec 14, 2018
1 parent 3acf741 commit 6afcc4d
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 10 deletions.
14 changes: 13 additions & 1 deletion amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,16 @@
}
}

[feature = 'man_made_crane'] {
[zoom >= 16][height > 50],
[zoom >= 17] {
marker-file: url('symbols/man_made/crane.svg');
marker-fill: @man-made-icon;
marker-placement: interior;
marker-clip: false;
}
}

[feature = 'man_made_telescope']["telescope:type" != 'optical']["telescope:type" != null] {
[zoom >= 13]["telescope:diameter" >= 60],
[zoom >= 14]["telescope:diameter" >= 30],
Expand Down Expand Up @@ -2000,6 +2010,7 @@
[feature = 'man_made_telescope'][zoom >= 17],
[feature = 'man_made_water_tower'][zoom >= 17],
[feature = 'man_made_chimney'][zoom >= 17],
[feature = 'man_made_crane'][zoom >= 17],
[feature = 'man_made_waste_water_plant'][zoom >= 17] {
text-name: "[name]";
text-size: @standard-font-size;
Expand All @@ -2019,7 +2030,8 @@
[feature = 'man_made_water_tower'],
[feature = 'man_made_storage_tank'],
[feature = 'man_made_silo'],
[feature = 'man_made_chimney'] {
[feature = 'man_made_chimney'],
[feature = 'man_made_crane'] {
text-dy: 10;
}
[feature = 'natural_cave_entrance'] {
Expand Down
19 changes: 10 additions & 9 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ Layer:
'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort',
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing')
THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo')
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) 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', 'castle', 'manor', 'city_gate')
Expand Down Expand Up @@ -1541,7 +1541,7 @@ Layer:
OR leisure IN ('water_park', 'playground', 'miniature_golf', 'golf_course', 'picnic_table', 'fitness_centre',
'fitness_station', 'firepit', 'sauna', 'beach_resort', 'bowling_alley', 'outdoor_seating', 'bird_hide',
'amusement_arcade', 'sports_centre', 'swimming_area', 'fishing')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IN ('spring')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor', 'city_gate')
Expand Down Expand Up @@ -1611,7 +1611,8 @@ Layer:
'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort',
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre',
'swimming_area', 'fishing') THEN leisure ELSE NULL END,
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo')
'man_made_' || CASE WHEN (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'obelisk', 'communications_tower', 'telescope',
'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) THEN man_made ELSE NULL END,
'natural_' || CASE WHEN "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') THEN "natural" ELSE NULL END,
'waterway_' || CASE WHEN "waterway" IN ('waterfall') THEN waterway ELSE NULL END,
Expand Down Expand Up @@ -1644,7 +1645,7 @@ 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))
WHEN (man_made IN ('mast', 'tower', 'chimney''chimney', 'crane') AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR waterway IN ('waterfall') THEN
CASE
WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC
Expand Down Expand Up @@ -1701,7 +1702,7 @@ Layer:
'bowling_alley', 'outdoor_seating', 'bird_hide', 'amusement_arcade', 'sports_centre',
'swimming_area', 'fishing')
OR barrier IN ('toll_booth')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo')
OR (man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk', 'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance')
OR waterway IN ('waterfall')
Expand Down Expand Up @@ -2107,7 +2108,7 @@ Layer:
'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', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works',
'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) 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', 'strait', 'cape') THEN "natural" ELSE NULL END,
Expand Down Expand Up @@ -2176,7 +2177,7 @@ Layer:
OR leisure IS NOT NULL
OR landuse IS NOT NULL
OR (man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'pier', 'breakwater', 'groyne', 'obelisk', 'works',
'communications_tower', 'telescope', 'chimney', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
'communications_tower', 'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
Expand Down Expand Up @@ -2301,7 +2302,7 @@ Layer:
'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', 'tower', 'water_tower', 'obelisk', 'works', 'communications_tower',
'telescope', 'chimney', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL)) 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', 'strait', 'cape')
Expand Down Expand Up @@ -2373,7 +2374,7 @@ Layer:
'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', 'tower', 'water_tower', 'cross', 'obelisk', 'works', 'communications_tower',
'telescope', 'chimney', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
'telescope', 'chimney', 'crane', 'storage_tank', 'silo', 'wastewater_plant', 'water_works')
AND (tags->'location' NOT IN ('roof', 'rooftop') OR (tags->'location') IS NULL))
OR "natural" IS NOT NULL
OR waterway IN ('waterfall')
Expand Down
41 changes: 41 additions & 0 deletions symbols/man_made/crane.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6afcc4d

Please sign in to comment.