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

SVG rasterising goes a bit nuts some times #681

Closed
artemp opened this issue Oct 11, 2011 · 3 comments
Closed

SVG rasterising goes a bit nuts some times #681

artemp opened this issue Oct 11, 2011 · 3 comments

Comments

@artemp
Copy link
Member

artemp commented Oct 11, 2011

I have an SVG file that renders with artefacts (bank1.svg and bank1.png). I noticed in Inkscape that at the location of the artefacts there are nodes on top of one another, so maybe there's a maths error going on there with zero-length edges.

However, when I move the duplicated nodes to one side by a small amount (bank2.svg bank2.png) mapnik goes completely nuts and the contents of the icon end up rendered all over the place.

I've checked the .svg files in Inkscape, Firefox, Chrome and the Gimp, and they all render it similarly, although I don't know if those four share an SVG library.

These are rendering to a png output using generate_image.py. Mapnik trunk r2427

@artemp
Copy link
Member Author

artemp commented Oct 11, 2011

[thjc] I think this is caused by a relative move command (m) in the path after a close command (z). I think the path parsing code doesn't actually reset the cursor to the start of the path after a close event so the next polygon is incorrectly drawn relative to the last point instead of the start of the last polygon.

@springmeyer
Copy link
Member

@artemp - should this be fixed by #1294? Testcases are at http://173.255.217.246:8000/mapnik_trac/ticket/681

@artemp
Copy link
Member Author

artemp commented Jul 9, 2012

@springmeyer - yes, that particular SVG is rendered correctly now.

@artemp artemp closed this as completed Jul 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants