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

Projection artifacts when drawing polygons #1399

Closed
gravitystorm opened this issue Aug 16, 2012 · 7 comments
Closed

Projection artifacts when drawing polygons #1399

gravitystorm opened this issue Aug 16, 2012 · 7 comments
Milestone

Comments

@gravitystorm
Copy link

I get small projection artefacts when drawing polygons. The source is a shapefile in epsg:27700 (osgb), and the destination is spherical mercator.

http://thunderflames.org/temp/mapnik-projection-mod-tile.png
http://thunderflames.org/temp/mapnik-projection-tilemill.png

The projection "wedges" appear in both TileMill and when using mod_tile. They appear to occur in the corner of every metatile, so the ones from mod_tile are larger and further apart - so I don't think that it's related either to the underlying data nor to tilemill/mod_tile

I've found this in 2.1-stable commit 2375fcd . The source files are open data from Ordnance Survey, and I'll try to get some simple steps to reproduce.

@artemp
Copy link
Member

artemp commented Aug 16, 2012

@gravitystorm - can you try turning clipping off e.g clip="false" ?

@gravitystorm
Copy link
Author

@artemp - indeed, the artefacts disappear with clip="false".

@springmeyer
Copy link
Member

We likely need to inflate the clipping extent more when reprojection is happening and the layer bbox is not square against mercator. This will be tricky to get right, so yeah, turning off clipping manually seems like a good workaround for now.

springmeyer pushed a commit that referenced this issue Aug 23, 2012
@springmeyer
Copy link
Member

I've replicated with this shapefile (wget http://www.wfas.net/maps/data/fdc_f.zip) which is in +init=EPSG:2163. (Interestingly this shapefile also suffers from a different problem where data in New England disappears at <= z2).

So in c3dae01 I have disabled clipping for polygon rendering when reprojecting. This seems like the safest thing to do for the 2.1 release until we figure out a better method for avoiding this problem.

@springmeyer
Copy link
Member

moving to 2.1.1 milestone to revisit then.

@strk
Copy link
Contributor

strk commented Dec 21, 2012

this sounds like an issue similar to the simplify geometry #1639 (ie: dependency of a feature on reprojection taking place). We could handle in the same way there (disable if reprojecting).

@springmeyer
Copy link
Member

@strk, this is because the clipping bbox is in geographical coordinates and so when the source data is in a different projection, the clipping box may take away the wrong data. This was handled by disabling clipping when reprojecting. So, this is done/fixed. Discussion of better ideas that wholesale disabling of clipping should take place at #1433

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants