diff --git a/amenity-points.mss b/amenity-points.mss index a690758e91..a076c4de33 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1164,7 +1164,19 @@ marker-placement: interior; marker-clip: false; } - + + [feature = 'waterway_waterfall'] { + [zoom >= 13][height > 20], + [zoom >= 14][height > 10], + [zoom >= 15][name != null], + [zoom >= 16] { + marker-file: url('symbols/waterfall.svg'); + marker-placement: interior; + marker-clip: false; + marker-fill: @water-text; + } + } + [feature = 'military_bunker'][zoom >= 17] { marker-file: url('symbols/bunker.svg'); marker-fill: @man-made-icon; @@ -1552,6 +1564,24 @@ text-placement: interior; } + [feature = 'waterway_waterfall'] { + [zoom >= 13][height > 20], + [zoom >= 14][height > 10], + [zoom >= 15][name != null], + [zoom >= 16] { + text-name: "[name]"; + text-size: @standard-font-size; + text-wrap-width: @standard-wrap-width; + text-line-spacing: @standard-line-spacing-size; + text-fill: @water-text; + text-dy: 10; + text-face-name: @standard-font; + text-halo-radius: @standard-halo-radius; + text-halo-fill: @standard-halo-fill; + text-placement: interior; + } + } + [feature = 'man_made_cross'][zoom >= 17], [feature = 'historic_wayside_cross'][zoom >= 17], [feature = 'historic_wayside_shrine'][zoom >= 17], diff --git a/project.mml b/project.mml index a774e128d1..d05af5b32c 100644 --- a/project.mml +++ b/project.mml @@ -1430,6 +1430,7 @@ Layer: table: |- (SELECT way, + name, COALESCE( 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', @@ -1534,6 +1535,7 @@ Layer: table: |- (SELECT way, + name, COALESCE( 'aeroway_' || CASE WHEN aeroway IN ('helipad', 'aerodrome') THEN aeroway ELSE NULL END, 'tourism_' || CASE WHEN tourism IN ('artwork', 'alpine_hut', 'camp_site', 'caravan_site', 'chalet', 'wilderness_hut', 'guest_house', 'apartment', 'hostel', @@ -1553,6 +1555,7 @@ Layer: 'dog_park', 'fitness_centre', 'fitness_station', 'firepit', 'sauna', 'beach_resort') THEN leisure 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, + 'waterway_' || CASE WHEN "waterway" IN ('waterfall') THEN waterway ELSE NULL END, 'historic_' || CASE WHEN historic IN ('memorial', 'monument', 'archaeological_site', 'fort', 'castle', 'manor') THEN concat_ws('_', historic, CASE WHEN tags->'memorial' IN ('plaque') THEN tags->'memorial' ELSE NULL END) ELSE NULL END, @@ -1572,15 +1575,20 @@ Layer: WHEN tags->'ele' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'ele')::NUMERIC ELSE NULL END + WHEN "waterway" IN ('waterfall') THEN + CASE + WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC + ELSE NULL + END ELSE NULL END AS score, religion, tags->'denomination' as denomination, tags->'generator:source' as "generator:source", CASE - WHEN man_made IN ('mast', 'tower') THEN + WHEN man_made IN ('mast', 'tower') OR waterway IN ('waterfall') THEN CASE - WHEN tags->'height' ~ '^-?\d{1,4}(\.\d+)?$' THEN (tags->'height')::NUMERIC + WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC ELSE NULL END ELSE NULL @@ -1615,6 +1623,7 @@ Layer: OR barrier IN ('toll_booth') OR man_made IN ('mast', 'tower', 'water_tower', 'lighthouse', 'windmill', 'cross', 'obelisk') OR "natural" IN ('peak', 'volcano', 'saddle', 'spring', 'cave_entrance') + OR waterway IN ('waterfall') OR historic IN ('memorial', 'monument', 'archaeological_site', 'wayside_cross', 'fort', 'wayside_shrine', 'castle', 'manor') OR tags->'memorial' IN ('plaque') OR military IN ('bunker') @@ -2027,6 +2036,14 @@ Layer: NULL END ) AS name, + CASE + WHEN "waterway" IN ('waterfall') THEN + CASE + WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC + ELSE NULL + END + ELSE NULL + END AS height, tags->'operator' as operator, tags->'icao' as icao, tags->'iata' as iata, @@ -2102,13 +2119,16 @@ Layer: access, CONCAT( name, - CASE WHEN name IS NOT NULL AND elevation IS NOT NULL THEN E'\n' ELSE NULL END, - CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') ELSE NULL END + CASE WHEN name IS NOT NULL AND (elevation IS NOT NULL OR height IS NOT NULL) THEN E'\n' ELSE NULL END, + CASE WHEN elevation IS NOT NULL THEN CONCAT(REPLACE(ROUND(elevation)::TEXT, '-', U&'\2212'), U&'\00A0', 'm') ELSE NULL END, + CASE WHEN height IS NOT NULL THEN CONCAT(ROUND(height)::TEXT, U&'\00A0', 'm') ELSE NULL END ) AS name, CASE WHEN "natural" IN ('peak', 'volcano', 'saddle') THEN elevation + WHEN "waterway" IN ('waterfall') THEN height ELSE NULL END AS score, + height, operator, icao, iata, @@ -2157,6 +2177,7 @@ Layer: '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, + 'waterway_' || CASE WHEN waterway IN ('waterfall') THEN waterway ELSE NULL END, '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, @@ -2180,7 +2201,16 @@ Layer: END ELSE NULL END AS elevation, + CASE + WHEN "waterway" IN ('waterfall') THEN + CASE + WHEN tags->'height' ~ '^\d{1,3}(\.\d+)?( m)?$' THEN (SUBSTRING(tags->'height', '^(\d{1,3}(\.\d+)?)( m)?$'))::NUMERIC + ELSE NULL + END + ELSE NULL + END AS height, "natural", + waterway, tags->'operator' as operator, tags->'icao' as icao, tags->'iata' as iata, @@ -2203,6 +2233,7 @@ Layer: 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction', 'military', 'plant_nursery') OR man_made IN ('lighthouse', 'windmill', 'mast', 'tower', 'water_tower', 'cross', 'obelisk', 'works') OR "natural" IS NOT NULL + OR waterway IN ('waterfall') OR place IN ('island', 'islet') OR barrier IN ('toll_booth') OR military IN ('danger_area', 'bunker') diff --git a/symbols/waterfall.svg b/symbols/waterfall.svg new file mode 100644 index 0000000000..db6b6be8d9 --- /dev/null +++ b/symbols/waterfall.svg @@ -0,0 +1,4 @@ + + + +