-
Notifications
You must be signed in to change notification settings - Fork 826
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
PolygonPatternSymbolizer question #4007
Comments
There is no constructor such as mapnik.PolygonPatternSymbolizer('patterns/pattern.svg','svg',8,8) I would try it this way, but I haven't tested if it really works: sym = mapnik.PolygonPatternSymbolizer()
sym.file = 'patterns/pattern.svg' Why not to define the style as XML? There is a drawback concerning rendering PolygonPatternSymbolizer with an SVG into a PDF now. Mapnik is rasterizing the SVG first so the pattern in resulting PDF is not rendered as vectors. I have solved this in downstream version of Mapnik, but haven't merged it to the upstream yet. |
Thank you for pointing me in the right direction - defining the style in a .xml worked for a .png pattern (however not .svg) I've also tried the following before:
But neither raster, not vector version, have produced any fill. P.S. Really useful info regarding .svg patterns being rasterized btw... however sad it may be |
That's strange, there should not be much difference. Maybe Mapnik has problem with interpreting that SVG. Can you, please, try some SVG from Mapnik test data which is tested to render correctly: |
Indeed, a faulty .svg |
There was some work on SVG processing since Mapnik 3.0.12. The latest version of Mapnik could handle that SVG better. If the SVG seems correct, you can fill a new issue with that SVG file. |
It was an InkScape .svg that was not compressed/optimized |
@gitdevnull Just for information, I have created a patch for rendering vector patterns in #4009. |
Hi,
Could someone please explain why would the PolygonPatternSymbolizer example below not work?
It works as expected using PolygonSymbolizer, highlighting the necessary polygons, but not when I try to use a .svg pattern instead.
Any suggestions much appreciated.
P.S. I'm using mapnik 3.0.12
The text was updated successfully, but these errors were encountered: