Skip to content

Commit

Permalink
Add color fill for mangrove, reedbed and saltmarsh wetlands (#3807)
Browse files Browse the repository at this point in the history
* Add salt dots pattern to saltmarsh fill color

* Add fill for mangroves, reedbeds and saltmarsh

Mangroves: scrub color - reedbed: grass color - saltmarsh: grass color
  • Loading branch information
jeisenbe authored Aug 30, 2019
1 parent 0962345 commit 8b8e392
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 0 deletions.
19 changes: 19 additions & 0 deletions landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,18 @@
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'wetland_mangrove'][zoom >= 5] {
polygon-fill: @scrub;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'wetland_reedbed'][zoom >= 5] {
polygon-fill: @grass;
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}

[feature = 'wetland_bog'],
[feature = 'wetland_string_bog'] {
[zoom >= 5] {
Expand All @@ -550,9 +562,16 @@

[feature = 'wetland_wet_meadow'],
[feature = 'wetland_fen'],
[feature = 'wetland_saltmarsh'],
[feature = 'wetland_marsh'] {
[zoom >= 5] {
polygon-fill: @grass;
[feature = 'wetland_saltmarsh'][zoom >= 13] {
polygon-pattern-file: url('symbols/salt-dots-2.png');
polygon-pattern-alignment: global;
[way_pixels >= 4] { polygon-pattern-gamma: 0.75; }
[way_pixels >= 64] { polygon-pattern-gamma: 0.3; }
}
[way_pixels >= 4] { polygon-gamma: 0.75; }
[way_pixels >= 64] { polygon-gamma: 0.3; }
}
Expand Down
9 changes: 9 additions & 0 deletions symbols/generating_patterns/salt-dots-2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions symbols/generating_patterns/salt-dots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The salt-dots pattern is based on salt-dots.svg

For the pattern visit [jsdotpattern (command sequence is recorded)](http://www.imagico.de/map/jsdotpattern.php#x,256,jdp68152;g,5,32,32;rx,25,2,32,32;rx,25,2,32,32;rx,25,2,32,32;rd,0,0,0,dot,0.125,10,9,0,jdp48264,ffffff,cdebb0;)

The result is this following [pattern](http://www.imagico.de/map/jsdotpattern.php#x,256,jdp68152;g,5,32,32;rx,25,2,32,32;rx,25,2,32,32;rx,25,2,32,32;rd,0,0,0,dot,0.125,10,9,0,jdp48264,ffffff,cdebb0;).

Generated SVG image is sanitized for use with Mapnik by the script svg_pattern.sh from the jsdotpattern repository at http://github.com/imagico/jsdotpattern.

The final file is salt-dots.svg

However, since SVG patterns is not properly handled by Mapnik at this time, the SVG file was converted to a PNG file with alpha channel, salt-dots.png
Binary file added symbols/salt-dots-2.png
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 8b8e392

Please sign in to comment.