-
Notifications
You must be signed in to change notification settings - Fork 6
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
Mapnik-compatible SVGs #3
Comments
Inlining every symbols will significantly blow up the file sizes so it will only be feasible for patterns with relatively few and simple symbols. But good to know this would be a requirement for use directly in Mapnik. I am not too sure how useful svg patterns would actually be for direct use in rendering - much more useful would be if there was support for using grayscale pattern images to generate the actual pattern from the style. |
Inlining of symbols is now possible but not tested in mapnik yet. |
A script is now available that converts jsdotpattern SVGs into a Mapnik compatible form using inkscape. This is fairly ugly but there is no reasonable way to directly generate Mapnik compatible SVGs from within Snap (or other JS SVG libraries). |
Apparently if the SVG content does not fully fill the bounding box Mapnik performs some kind of transform to the pattern that can break periodicity - see gravitystorm/openstreetmap-carto#2685 You can work around this by using symbol offsets so the pattern symbols cross all edges of the bounding box but it should be possible to work around this from svg_pattern.sh by adding an invisible dummy geometry. |
I hope this is now finally done by adding a dummy geometry in |
Mapnik cannot make use of SVGs with
<use/>
to my knowledge. This is annoying, but unlikely to change by 3.0 release. A mode to generate a SVG without would be useful.This does not matter with currently released versions of Mapnik, which do not support SVGs for polygon-patterns at all, and the output of this tool is extremely unlikely to be used with a point symbolizer.
The text was updated successfully, but these errors were encountered: