Skip to content

Commit

Permalink
Adding rendering for historic=castle
Browse files Browse the repository at this point in the history
  • Loading branch information
kocio-pl committed Mar 3, 2018
1 parent efab9c8 commit e558aae
Show file tree
Hide file tree
Showing 5 changed files with 148 additions and 9 deletions.
22 changes: 21 additions & 1 deletion amenity-points.mss
Original file line number Diff line number Diff line change
Expand Up @@ -618,6 +618,25 @@
marker-clip: false;
}

[feature = 'historic_castle'][zoom >= 16] {
marker-file: url('symbols/castle.svg');
marker-fill: @memorials;
marker-placement: interior;
marker-clip: false;
[castle_type = 'palace'],
[castle_type = 'stately'],
[castle_type = 'manor'] {
marker-file: url('symbols/palace.svg');
}
[castle_type = 'fortress'],
[castle_type = 'defensive'],
[castle_type = 'castrum'],
[castle_type = 'shiro'],
[castle_type = 'kremlin'] {
marker-file: url('symbols/fortress.svg');
}
}

[feature = 'historic_archaeological_site'][zoom >= 16] {
marker-file: url('symbols/archaeological_site.svg');
marker-fill: @culture;
Expand Down Expand Up @@ -1434,7 +1453,8 @@
[feature = 'historic_memorial_plaque'][zoom >= 19],
[feature = 'man_made_obelisk'][zoom >= 16],
[feature = 'historic_monument'][zoom >= 16],
[feature = 'historic_fort'][zoom >= 16] {
[feature = 'historic_fort'][zoom >= 16],
[feature = 'historic_castle'][zoom >= 16] {
text-name: "[name]";
text-size: @standard-font-size;
text-wrap-width: @standard-wrap-width;
Expand Down
21 changes: 13 additions & 8 deletions project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1443,7 +1443,7 @@ Layer:
'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,
'natural_' || CASE WHEN "natural" IN ('spring') THEN "natural" ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'military_'|| CASE WHEN military IN ('bunker') THEN military ELSE NULL END,
Expand All @@ -1459,6 +1459,7 @@ Layer:
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'castle_type' as castle_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 @@ -1480,7 +1481,7 @@ Layer:
'fitness_station', 'firepit')
OR man_made IN ('mast', 'water_tower', 'lighthouse', 'windmill', 'obelisk')
OR "natural" IN ('spring')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
OR tags->'memorial' IN ('plaque')
OR military IN ('bunker')
OR highway IN ('bus_stop', 'elevator', 'traffic_signals')
Expand Down Expand Up @@ -1535,7 +1536,7 @@ Layer:
'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,
'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')
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'military_'|| CASE WHEN military IN ('bunker') THEN military ELSE NULL END,
Expand Down Expand Up @@ -1563,6 +1564,7 @@ Layer:
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'castle_type' as castle_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 @@ -1585,7 +1587,7 @@ Layer:
OR barrier IN ('toll_booth')
OR man_made IN ('mast', '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 historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle')
OR tags->'memorial' IN ('plaque')
OR military IN ('bunker')
OR tags @> 'emergency=>phone'
Expand Down Expand Up @@ -1977,7 +1979,7 @@ Layer:
'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier') THEN "natural" ELSE NULL END,
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
'military_' || CASE WHEN military IN ('danger_area', 'bunker') THEN military ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END,
Expand All @@ -1999,6 +2001,7 @@ Layer:
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'castle_type' as castle_type,
ref,
way_area,
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building
Expand All @@ -2015,7 +2018,7 @@ Layer:
OR "natural" IS NOT NULL
OR place IN ('island', 'islet')
OR military IN ('danger_area', 'bunker')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
OR tags->'memorial' IN ('plaque')
OR highway IN ('services', 'rest_area', 'bus_stop', 'elevator')
OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')
Expand Down Expand Up @@ -2079,6 +2082,7 @@ Layer:
icao,
iata,
recycling_type,
castle_type,
ref,
way_area,
is_building
Expand Down Expand Up @@ -2122,7 +2126,7 @@ Layer:
'place_' || CASE WHEN place IN ('island', 'islet') THEN place ELSE NULL END,
'barrier_' || CASE WHEN barrier IN ('toll_booth') THEN barrier ELSE NULL END,
'military_' || CASE WHEN military IN ('danger_area', 'bunker') THEN military ELSE NULL END,
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort')
'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle')
THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END)
ELSE NULL END,
'highway_' || CASE WHEN highway IN ('services', 'rest_area', 'bus_stop', 'elevator') THEN highway ELSE NULL END,
Expand All @@ -2147,6 +2151,7 @@ Layer:
tags->'icao' as icao,
tags->'iata' as iata,
tags->'recycling_type' as recycling_type,
tags->'castle_type' as castle_type,
ref,
NULL AS way_area,
CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building
Expand All @@ -2166,7 +2171,7 @@ Layer:
OR place IN ('island', 'islet')
OR barrier IN ('toll_booth')
OR military IN ('danger_area', 'bunker')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine')
OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle')
OR tags->'memorial' IN ('plaque')
OR highway IN ('bus_stop', 'services', 'rest_area', 'elevator')
OR power IN ('plant', 'station', 'generator', 'sub_station', 'substation')
Expand Down
38 changes: 38 additions & 0 deletions symbols/castle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions symbols/fortress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
38 changes: 38 additions & 0 deletions symbols/palace.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 e558aae

Please sign in to comment.