Skip to content

Commit

Permalink
More patterns to SVG
Browse files Browse the repository at this point in the history
  • Loading branch information
sommerluk committed Aug 7, 2017
1 parent ffec9bd commit cf68094
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@
[natural = 'beach'],
[natural = 'shoal'] {
[surface = 'sand'] {
polygon-pattern-file: url('symbols/beach.svg');
polygon-pattern-file: url('symbols/beach.png');
polygon-pattern-alignment: global;
}
[surface = 'gravel'],
Expand Down
4 changes: 2 additions & 2 deletions symbols/beach.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions symbols/generating_patterns/beach.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Pattern file for forests is generated in two steps.
Pattern file for beach is generated in two steps.

In the first step visit [jsdotpattern (command sequence is recorded)](http://www.imagico.de/map/jsdotpattern.php#x,128,jdp59980;g,2.25,16,16;rx,250,2,8,8;rx,250,2,8,8;s,jdp58799;s,jdp49103;rx,250,2,8,8;rd,0,0,1,scree,0.1,5,10,0,jdp55873,9a9a9a,fff1ba)
In the first step visit [jsdotpattern (command sequence is recorded)](http://www.imagico.de/map/jsdotpattern.php#x,128,jdp59980;g,2.25,16,16;rx,250,2,8,8;rx,250,2,8,8;s,jdp58799;s,jdp49103;rx,250,2,8,8;rd,0,0,1,scree,0.1,5,10,0,jdp31724,dbb677,fff1ba;)

Generate file - use "render (px aligned)" followed by using "get pattern SVG data" (it is expected that background will be transparent, background colour in jsdotpattern is only for display).
Use "get pattern SVG data" (it is expected that background will be transparent, background colour in jsdotpattern is only for display).

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

The final file is beach.svg
The final file is beach.svg
9 changes: 0 additions & 9 deletions symbols/generating_patterns/beach.svg

This file was deleted.

9 changes: 9 additions & 0 deletions symbols/generating_patterns/reef.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

The reef patterns are rasterized and colored versions of the provided SVG

```
convert -depth 8 reef.svg reef_raw.png
convert -depth 8 -size 256x256 xc:"#969696" \( reef_raw.png -negate \) -set colorspace RGB -alpha Off -compose CopyOpacity -composite -set colorspace sRGB +gamma - beach_coarse.png
convert -depth 8 -size 256x256 xc:"#549ccd" \( reef_raw.png -negate \) -set colorspace RGB -alpha Off -compose CopyOpacity -composite -set colorspace sRGB +gamma - reef.png
```

0 comments on commit cf68094

Please sign in to comment.