Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leaf type rendering with slightly bigger symbols and switch forest patterns to 256 px #2747

Merged
merged 5 commits into from
Aug 18, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion landcover.mss
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,11 @@

//Also landuse = forest, converted in the SQL
[natural = 'wood'][zoom >= 13]::wood {
polygon-pattern-file: url('symbols/forest.svg'); // Lch(55,30,135)
polygon-pattern-file: url('symbols/leaftype_unknown.svg'); // Lch(55,30,135)
[leaf_type = "broadleaved"] { polygon-pattern-file: url('symbols/leaftype_broadleaved.svg'); }
[leaf_type = "needleleaved"] { polygon-pattern-file: url('symbols/leaftype_needleleaved.svg'); }
[leaf_type = "mixed"] { polygon-pattern-file: url('symbols/leaftype_mixed.svg'); }
[leaf_type = "leafless"] { polygon-pattern-file: url('symbols/leaftype_leafless.svg'); }
polygon-pattern-alignment: global;
opacity: 0.4; // The entire layer has opacity to handle overlapping forests
}
Expand Down
3 changes: 2 additions & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ Layer:
ELSE NULL
END
END
END AS int_wetland
END AS int_wetland,
tags->'leaf_type' AS leaf_type
FROM planet_osm_polygon
WHERE ("natural" IN ('marsh', 'mud', 'wetland', 'wood', 'beach', 'shoal', 'reef', 'scrub') OR landuse = 'forest')
AND building IS NULL
Expand Down
31 changes: 0 additions & 31 deletions symbols/forest.svg

This file was deleted.

13 changes: 13 additions & 0 deletions symbols/generating_patterns/broadleaved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions symbols/generating_patterns/forest.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
Pattern file for forests is generated in two steps.
Pattern file for forests is generated in various steps.

In the first step visit [jsdotpattern (command sequence is recorded)](http://www.imagico.de/map/jsdotpattern.php#x,512,jdp6894;g,30,32,32;s,jdp33742;s,jdp81637;rx,250,2,32,32;s,jdp28824;s,jdp59702;s,jdp91550;s,jdp27774;rx,250,2,64,64;rd,1,0,0,tree%20pair,1,5,5,0,jdp52898,6b8d5e,add19e;)
For the pattern for unknown leave type visit [jsdotpattern (command sequence is recorded)](http://www.imagico.de/map/jsdotpattern.php#x,256,jdp6894;g,30,32,32;s,jdp33742;s,jdp81637;rx,250,2,32,32;s,jdp28824;s,jdp59702;s,jdp91550;s,jdp27774;rx,250,2,64,64;rd,1,0,0,tree%20pair,1,5,5,0,jdp52898,6b8d5e,add19e;) For the other leave types you have to install jsdotpattern locally, and install the SVG symbols (broadleaved.svg and needleleaved.svg, see the documentation of jsdotpattern about how to do this) and use the same command sequence. For the mixed leave type, you have to use broadleaved.svg and needleleaved.svg together in a subfolder. For the mixed leave type, you have to use leafless1.svg and leafless2.svg together in a subfolder.

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).

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 forest.svg
The final files are leavetype_unknown, leavetype_mixed.svg, leavetype_broadleaved.svg, leavetype_needleleaved.svg and leavetype_leafless.svg.

13 changes: 13 additions & 0 deletions symbols/generating_patterns/leafless1.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions symbols/generating_patterns/leafless2.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions symbols/generating_patterns/needleleaved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions symbols/leaftype_broadleaved.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
39 changes: 39 additions & 0 deletions symbols/leaftype_leafless.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading