From bf6fd0ca208dbb56f3d4d5688746ae772d0768c2 Mon Sep 17 00:00:00 2001 From: Adamant36 Date: Tue, 16 Oct 2018 00:36:30 -0700 Subject: [PATCH 1/2] add rendering for natural=cape --- amenity-points.mss | 3 ++- project.mml | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index 00aa93bbcd..9dd4d2ccc0 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1555,6 +1555,7 @@ /* Note that .text is also used in water.mss */ .text-low-zoom[zoom < 10], .text[zoom >= 10] { + [feature = 'natural_cape'], [feature = 'place_island'][zoom >= 4][way_pixels > 3000][way_pixels < 800000], [feature = 'place_island'][zoom >= 16][way_pixels < 800000], [feature = 'place_islet'][zoom >= 11][way_pixels > 3000][way_pixels < 800000], @@ -2272,7 +2273,7 @@ } } } - + [feature = 'natural_bay'][zoom >= 14], [feature = 'natural_spring'][zoom >= 16] { text-name: "[name]"; diff --git a/project.mml b/project.mml index 6947d6c204..465c9cfbde 100644 --- a/project.mml +++ b/project.mml @@ -2025,7 +2025,7 @@ Layer: COALESCE( 'landuse_' || CASE WHEN landuse IN ('forest', 'military', 'farmland') THEN landuse ELSE NULL END, 'natural_' || CASE WHEN "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', - 'water', 'bay', 'strait') THEN "natural" ELSE NULL END, + 'water', 'bay', 'strait', 'cape') THEN "natural" ELSE NULL END, 'place_' || CASE WHEN place IN ('island') THEN place ELSE NULL END, 'boundary_' || CASE WHEN boundary IN ('national_park') THEN boundary ELSE NULL END, 'leisure_' || CASE WHEN leisure IN ('nature_reserve') THEN leisure ELSE NULL END @@ -2034,7 +2034,7 @@ Layer: CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions FROM planet_osm_polygon WHERE (landuse IN ('forest', 'military', 'farmland') - OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait') + OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait', 'cape') OR "place" IN ('island') OR boundary IN ('national_park') OR leisure IN ('nature_reserve')) @@ -2096,7 +2096,7 @@ Layer: 'chimney', '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') THEN "natural" ELSE NULL END, + 'grassland', 'scrub', 'beach', 'shoal', 'reef', 'glacier', 'strait', 'cape') 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', 'castle', 'manor', 'city_gate') @@ -2269,7 +2269,7 @@ Layer: 'chimney', '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') + 'scree', 'shingle', 'bare_rock', 'sand', 'heath', 'grassland', 'scrub', 'beach', 'glacier', 'tree', 'strait', 'cape') 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, From 95d1055c0f933070417d457d5222a6c8668897b9 Mon Sep 17 00:00:00 2001 From: Adamant36 Date: Mon, 19 Nov 2018 00:00:27 -0800 Subject: [PATCH 2/2] Add render for cape on both nodes and ways --- amenity-points.mss | 20 ++++++++++++++++++-- project.mml | 6 +----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/amenity-points.mss b/amenity-points.mss index 5fc6d64d6f..a739897397 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1624,7 +1624,8 @@ /* Note that .text is also used in water.mss */ .text-low-zoom[zoom < 10], .text[zoom >= 10] { - [feature = 'natural_cape'], + [feature = 'natural_cape'][zoom >= 4][way_pixels > 3000][way_pixels < 800000], + [feature = 'natural_cape'][zoom >= 16][way_pixels < 800000], [feature = 'place_island'][zoom >= 4][way_pixels > 3000][way_pixels < 800000], [feature = 'place_island'][zoom >= 16][way_pixels < 800000], [feature = 'place_islet'][zoom >= 11][way_pixels > 3000][way_pixels < 800000], @@ -1873,6 +1874,21 @@ text-placement: interior; } + [feature = 'natural_cape'][zoom >= 14] { + text-name: "[name]"; + text-fill: #000; + text-size: @landcover-font-size; + text-wrap-width: @landcover-wrap-width-size; + text-line-spacing: @landcover-line-spacing-size; + text-size: @landcover-font-size-big; + text-wrap-width: @landcover-wrap-width-size-big; + text-line-spacing: @landcover-line-spacing-size-big; + text-face-name: @oblique-fonts; + text-halo-radius: @standard-halo-radius; + text-halo-fill: @standard-halo-fill; + text-placement: interior; + } + [feature = 'tourism_information'][zoom >= 19], [feature = 'tourism_information']["information"='office'][zoom >= 17] { text-name: "[name]"; @@ -2356,7 +2372,7 @@ } } } - + [feature = 'natural_bay'][zoom >= 14], [feature = 'natural_spring'][zoom >= 16] { text-name: "[name]"; diff --git a/project.mml b/project.mml index 2e0d034f4a..8b6840fbae 100644 --- a/project.mml +++ b/project.mml @@ -2031,12 +2031,8 @@ Layer: CASE WHEN building = 'no' OR building IS NULL THEN 'no' ELSE 'yes' END AS is_building -- always no with the where conditions FROM planet_osm_polygon WHERE (landuse IN ('forest', 'military', 'farmland') -<<<<<<< HEAD - OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait', 'cape') -======= OR military IN ('danger_area') - OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait') ->>>>>>> upstream/master + OR "natural" IN ('wood', 'glacier', 'sand', 'scree', 'shingle', 'bare_rock', 'water', 'bay', 'strait', 'cape') OR "place" IN ('island') OR boundary IN ('national_park') OR leisure IN ('nature_reserve'))