diff --git a/landcover.mss b/landcover.mss index bd83fea3e5..fabb2417a0 100644 --- a/landcover.mss +++ b/landcover.mss @@ -426,17 +426,10 @@ [way_pixels >= 64] { polygon-gamma: 0.3; } } - [feature = 'natural_scrub'] { - [zoom >= 10] { - polygon-fill: @scrub; - [way_pixels >= 4] { polygon-gamma: 0.75; } - [way_pixels >= 64] { polygon-gamma: 0.3; } - } - [zoom >= 14] { - polygon-pattern-file: url('symbols/scrub.png'); - [way_pixels >= 4] { polygon-pattern-gamma: 0.75; } - [way_pixels >= 64] { polygon-pattern-gamma: 0.3; } - } + [feature = 'natural_scrub'][zoom >= 10] { + polygon-fill: @scrub; + [way_pixels >= 4] { polygon-gamma: 0.75; } + [way_pixels >= 64] { polygon-gamma: 0.3; } } [feature = 'wetland_swamp'][zoom >= 8] { @@ -625,7 +618,12 @@ polygon-pattern-alignment: global; } } + [natural = 'scrub'] { + polygon-pattern-file: url('symbols/scrub.png'); + polygon-pattern-alignment: global; + } } + //Also landuse = forest, converted in the SQL [natural = 'wood'][zoom >= 13]::wood { polygon-pattern-file: url('symbols/forest.png'); // Lch(55,30,135) diff --git a/project.mml b/project.mml index fffc90702c..3de7f8086b 100644 --- a/project.mml +++ b/project.mml @@ -280,7 +280,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, surface, \n COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, \"natural\") AS \"natural\",\n CASE WHEN \"natural\" IN ('marsh', 'mud') \n THEN \"natural\" \n ELSE CASE WHEN (\"natural\" = 'wetland' AND wetland IS NULL) \n THEN 'wetland' \n ELSE CASE WHEN (\"natural\" = 'wetland')\n THEN wetland\n ELSE NULL\n END \n END\n END AS int_wetland\n FROM planet_osm_polygon\n WHERE (\"natural\" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS landcover_area_symbols", + "table": "(SELECT\n way, surface, \n COALESCE(CASE WHEN landuse = 'forest' THEN 'wood' ELSE NULL END, \"natural\") AS \"natural\",\n CASE WHEN \"natural\" IN ('marsh', 'mud') \n THEN \"natural\" \n ELSE CASE WHEN (\"natural\" = 'wetland' AND wetland IS NULL) \n THEN 'wetland' \n ELSE CASE WHEN (\"natural\" = 'wetland')\n THEN wetland\n ELSE NULL\n END \n END\n END AS int_wetland\n FROM planet_osm_polygon\n WHERE (\"natural\" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest')\n AND building IS NULL\n AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real\n ORDER BY z_order, way_area DESC\n) AS landcover_area_symbols", "geometry_field": "way", "type": "postgis", "key_field": "", diff --git a/project.yaml b/project.yaml index 29aa170535..e492d1cca3 100644 --- a/project.yaml +++ b/project.yaml @@ -294,7 +294,7 @@ Layer: END END AS int_wetland FROM planet_osm_polygon - WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef') OR landuse = 'forest') + WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest') AND building IS NULL AND way_area > 0.01*!pixel_width!::real*!pixel_height!::real ORDER BY z_order, way_area DESC diff --git a/symbols/generating_patterns/scrub.md b/symbols/generating_patterns/scrub.md new file mode 100644 index 0000000000..9327bdc4bf --- /dev/null +++ b/symbols/generating_patterns/scrub.md @@ -0,0 +1,10 @@ +The scrub pattern is generated by visiting http://www.imagico.de/map/jsdotpattern.php and using the following options: + +- regular snub square ('5' button) +- distance = 45 +- radius = 64 +- radius y = 64 +- metric = 2 +- about 10-20 relax clicks +- 'scrub2' image +- use the "render (px aligned)" option diff --git a/symbols/generating_patterns/scrub.svg b/symbols/generating_patterns/scrub.svg new file mode 100644 index 0000000000..85ea639008 --- /dev/null +++ b/symbols/generating_patterns/scrub.svg @@ -0,0 +1,9 @@ + + + + + + + + + Created with Snap \ No newline at end of file diff --git a/symbols/scrub.png b/symbols/scrub.png index b43233aefb..c8218985c3 100644 Binary files a/symbols/scrub.png and b/symbols/scrub.png differ