diff --git a/amenity-points.mss b/amenity-points.mss index 91cde0059f..c9092e04e7 100644 --- a/amenity-points.mss +++ b/amenity-points.mss @@ -1641,8 +1641,28 @@ } } + [feature = 'natural_scree'][is_building = 'no'], + [feature = 'natural_shingle'][is_building = 'no'], + [feature = 'natural_bare_rock'][is_building = 'no'] { + [zoom >= 9][way_pixels > 3000], + [zoom >= 17] { + text-name: "[name]"; + text-size: @landcover-font-size; + [way_pixels > 12000] { text-size: @landcover-font-size-big; } + [way_pixels > 48000] { text-size: @landcover-font-size-bigger; } + text-fill: darken(@bare_ground, 50%); + text-face-name: @landcover-face-name; + text-halo-radius: 1; + text-halo-fill: rgba(255,255,255,0.6); + text-wrap-width: @landcover-wrap-width-size; + [way_pixels > 12000] {text-wrap-width: @landcover-wrap-width-size-big; } + [way_pixels > 48000] {text-wrap-width: @landcover-wrap-width-size-bigger; } + text-placement: interior; + } + } + [feature = 'natural_sand'][is_building = 'no'] { - [zoom >= 10][way_pixels > 3000], + [zoom >= 9][way_pixels > 3000], [zoom >= 17] { text-name: "[name]"; text-size: @landcover-font-size; diff --git a/landcover.mss b/landcover.mss index 672aa82c5b..f9460c5678 100644 --- a/landcover.mss +++ b/landcover.mss @@ -37,6 +37,7 @@ @aerodrome: #e9e7e2; @allotments: #e5c7ab; @apron: #e9d1ff; +@bare_ground: #eee5dc; @campsite: #def6c0; // also caravan_site, picnic_site @cemetery: #aacbaf; // also grave_yard @construction: #b6b592; @@ -49,7 +50,7 @@ @playground: #ccfff1; @power: #bbb; @rest_area: #efc8c8; // also services -@sand: #ffdf88; +@sand: #f5e9c6; @school: #f0f0d8; // also university, college, hospital, kindergarten @station: #d4aaaa; @scrub: #b5e3b5; @@ -375,7 +376,32 @@ } } - [feature = 'natural_sand'][zoom >= 10] { + [feature = 'natural_bare_rock'][zoom >= 9] { + polygon-fill: @bare_ground; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.3; } + [zoom >= 13] { + polygon-pattern-file: url('symbols/rock_overlay.png'); + [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } + [way_pixels >= 64] { polygon-pattern-gamma: 0.3; } + } + } + + [feature = 'natural_scree'], + [feature = 'natural_shingle'] { + [zoom >= 9] { + polygon-fill: @bare_ground; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.3; } + [zoom >= 13] { + polygon-pattern-file: url('symbols/scree_overlay.png'); + [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } + [way_pixels >= 64] { polygon-pattern-gamma: 0.3; } + } + } + } + + [feature = 'natural_sand'][zoom >= 9] { polygon-fill: @sand; [way_pixels >= 4] { polygon-gamma: 0.75; } [way_pixels >= 64] { polygon-gamma: 0.3; } diff --git a/project.mml b/project.mml index 8e9832dbd0..1935912c0d 100644 --- a/project.mml +++ b/project.mml @@ -85,7 +85,7 @@ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, name, way_pixels,\n COALESCE(landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n way_area/(!pixel_width!*!pixel_height!) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood'))\n AND way_area/(!pixel_width!*!pixel_height!) > 0.01\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n ) AS features\n) AS landcover_low_zoom", + "table": "(SELECT\n way, name, way_pixels,\n COALESCE(landuse, \"natural\") AS feature\n FROM (SELECT\n way, COALESCE(name, '') AS name,\n ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse,\n ('natural_' || (CASE WHEN \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n way_area/(!pixel_width!*!pixel_height!) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IN ('forest')\n OR \"natural\" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock'))\n AND way_area/(!pixel_width!*!pixel_height!) > 0.01\n AND building IS NULL\n ORDER BY z_order, way_area DESC\n ) AS features\n) AS landcover_low_zoom", "geometry_field": "way", "type": "postgis", "key_field": "", @@ -108,7 +108,7 @@ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over", "Datasource": { "extent": "-20037508,-20037508,20037508,20037508", - "table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature \n FROM (SELECT \n way, COALESCE(name, '') AS name, \n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/(!pixel_width!*!pixel_height!) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area/(!pixel_width!*!pixel_height!) > 0.01\n ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features", + "table": "(SELECT\n way, name, religion, way_pixels,\n COALESCE(aeroway, amenity, landuse, leisure, military, \"natural\", power, tourism, highway, railway) AS feature \n FROM (SELECT \n way, COALESCE(name, '') AS name, \n ('aeroway_' || (CASE WHEN aeroway IN ('apron', 'aerodrome') THEN aeroway ELSE NULL END)) AS aeroway,\n ('amenity_' || (CASE WHEN amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship') THEN amenity ELSE NULL END)) AS amenity,\n ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse,\n ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure,\n ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military,\n ('natural_' || (CASE WHEN \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN \"natural\" ELSE NULL END)) AS \"natural\",\n ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power,\n ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism,\n ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway,\n ('railway_' || (CASE WHEN railway = 'station' THEN railway ELSE NULL END)) AS railway,\n CASE WHEN religion IN ('christian', 'jewish') THEN religion ELSE 'INT-generic'::text END AS religion,\n way_area/(!pixel_width!*!pixel_height!) AS way_pixels\n FROM planet_osm_polygon\n WHERE (landuse IS NOT NULL\n OR leisure IS NOT NULL\n OR aeroway IN ('apron', 'aerodrome')\n OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship')\n OR military IN ('danger_area')\n OR \"natural\" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub')\n OR power IN ('station', 'sub_station', 'substation', 'generator')\n OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo')\n OR highway IN ('services', 'rest_area')\n OR railway = 'station')\n AND way_area/(!pixel_width!*!pixel_height!) > 0.01\n ORDER BY z_order, way_area DESC\n ) AS landcover\n) AS features", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index ce4dc62150..9cbff7c53e 100644 --- a/project.yaml +++ b/project.yaml @@ -105,11 +105,11 @@ Layer: FROM (SELECT way, COALESCE(name, '') AS name, ('landuse_' || (CASE WHEN landuse IN ('forest') THEN landuse ELSE NULL END)) AS landuse, - ('natural_' || (CASE WHEN "natural" IN ('wood') THEN "natural" ELSE NULL END)) AS "natural", + ('natural_' || (CASE WHEN "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock') THEN "natural" ELSE NULL END)) AS "natural", way_area/(!pixel_width!*!pixel_height!) AS way_pixels FROM planet_osm_polygon WHERE (landuse IN ('forest') - OR "natural" IN ('wood')) + OR "natural" IN ('wood', 'sand', 'scree', 'shingle', 'bare_rock')) AND way_area/(!pixel_width!*!pixel_height!) > 0.01 AND building IS NULL ORDER BY z_order, way_area DESC @@ -134,7 +134,7 @@ Layer: ('landuse_' || (CASE WHEN landuse IN ('quarry', 'vineyard', 'orchard', 'cemetery', 'residential', 'garages', 'meadow', 'grass', 'allotments', 'forest', 'farmyard', 'farm', 'farmland', 'recreation_ground', 'conservation', 'village_green', 'retail', 'industrial', 'railway', 'commercial', 'brownfield', 'landfill', 'construction') THEN landuse ELSE NULL END)) AS landuse, ('leisure_' || (CASE WHEN leisure IN ('swimming_pool', 'playground', 'park', 'recreation_ground', 'common', 'garden', 'golf_course', 'picnic_table', 'sports_centre', 'stadium', 'pitch', 'track') THEN leisure ELSE NULL END)) AS leisure, ('military_' || (CASE WHEN military IN ('danger_area') THEN military ELSE NULL END)) AS military, - ('natural_' || (CASE WHEN "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", + ('natural_' || (CASE WHEN "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') THEN "natural" ELSE NULL END)) AS "natural", ('power_' || (CASE WHEN power IN ('station', 'sub_station', 'substation', 'generator') THEN power ELSE NULL END)) AS power, ('tourism_' || (CASE WHEN tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') THEN tourism ELSE NULL END)) AS tourism, ('highway_' || (CASE WHEN highway IN ('services', 'rest_area') THEN highway ELSE NULL END)) AS highway, @@ -147,7 +147,7 @@ Layer: OR aeroway IN ('apron', 'aerodrome') OR amenity IN ('parking', 'university', 'college', 'school', 'hospital', 'kindergarten', 'grave_yard', 'place_of_worship') OR military IN ('danger_area') - OR "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scrub') + OR "natural" IN ('beach', 'heath', 'mud', 'grassland', 'wood', 'sand', 'scree', 'shingle', 'bare_rock', 'scrub') OR power IN ('station', 'sub_station', 'substation', 'generator') OR tourism IN ('attraction', 'camp_site', 'caravan_site', 'picnic_site', 'zoo') OR highway IN ('services', 'rest_area') diff --git a/symbols/rock_overlay.png b/symbols/rock_overlay.png new file mode 100644 index 0000000000..896e78dad1 Binary files /dev/null and b/symbols/rock_overlay.png differ diff --git a/symbols/scree_overlay.png b/symbols/scree_overlay.png new file mode 100644 index 0000000000..718fbb9360 Binary files /dev/null and b/symbols/scree_overlay.png differ