-
Notifications
You must be signed in to change notification settings - Fork 0
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
Randomized symbology for forests work #6
Comments
I am not exactly sure what you mean by blurry pixel alignment. In any case when redesigning the forest pattern i think moving to a different symbology would be a good idea. Taking leaf_type into account is not possible in the short term but the current symbol implying coniferous trees does not seem optimal. |
White background added for clarity. The SVG for each symbol is <g><path d="m 4,0 -3.25,3.25 0.75,0.75 2.5,-2.5 0,2.5
-3.25,3.25 0.75,0.75 2.5,-2.5 0,5.5
1,0 0,-5.5 2.5,2.5 0.75,-0.75 -3.25,-3.25 0,-2.5
2.5,2.5 0.75,-0.75 -3.25,-3.25 z" />
<path d="m 12.5,0 a 3,3 0 0,1 0,6 l 0,-1
a 2,2 0 0,0 0,-4
a 2,2 0 0,0 0,4 l 0,1
a 3,3 0 0,1 0,-6
z" />
<path d="m 12,5 l 1,0 0,6 -1,0 z"/>
</g> A SVG was created with your tool, pixel aligned. The SVG from your tool was converted to PNG with All symbols are misaligned by the same approximately quarter-pixel. As the left edge extends a quarter-pixel, I was thinking it could be a cause. |
To compare, @gravitystorm's outdoors symbology. One cool approach would be to have relaxed randomly displaced patterns with randomly selected sizes, but that's beyond what I'm going to attempt for now. |
This adds a random symbology for forests, lightens forests, and unifies natural=wood and landuse=forest rendering. Using http://www.imagico.de/map/jsdotpattern.php a random pattern was generated from the SVG <path d="m 3.5,0 -3.5,3.5 0,0.5 0.5,0 2.5,-2.5 0,2 -3,3 0,0.5 0.5,0 2.5,-2.5 0,5.5 1,0 0,-5.5 2.5,2.5 0.5,0 0,-0.5 -3,-3 0,-2 2.5,2.5 0.5,0 0,-0.5 z" fill="rgb(58,135,39)"/> <path d="m 10.5,0 a 2.5,3 0 0,1 0,6 l 0,-1 a 1.5,2 0 0,0 0,-4 a 1.5,2 0 0,0 0,4 l 0,1 a 2.5,3 0 0,1 0,-6 z" fill="rgb(58,135,39)"/> This was then converted with GIMP into a PNG which Mapnik can use. The forest fill was lightened, but there are now darker symbols on. This necessitated adjusting the text colour for forests, which was done in Lch colour space. The frequent symbols also required some halo adjustments. There are multiple interpretations in use of landuse=forest vs. natural=wood. Rather than attempt to sort this out when the tagging has not settled, the same appearance is used for both. This commit doesn't use different symbologies for different types of forests (mixed/coniferous/broad_leaved/palm) (gravitystorm#822), but that can be considered later. Fixes gravitystorm#938 Fixes forest part of gravitystorm#937 Closes #6
Yes, offset calculation is not working properly for pixel aligned rendering - see imagico/jsdotpattern#1 As far as rendering the SVG is concerned - you should try the options offered by ImageMagick:
For more options see: http://www.imagemagick.org/Usage/resize/ |
These look to be effectively the same as gimp - just different ways of handling the resize/filter. Lanczos and cubic in gimp are both good options, and I think at this point to get improved sharpness I'd get more out of doing the SVG -> bitmap conversion by hand for one symbol |
upstream gravitystorm#938
The text was updated successfully, but these errors were encountered: