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

Make polygon simplification aware of shared edges #301

Closed
e-n-f opened this issue Sep 23, 2016 · 10 comments
Closed

Make polygon simplification aware of shared edges #301

e-n-f opened this issue Sep 23, 2016 · 10 comments

Comments

@e-n-f
Copy link
Contributor

e-n-f commented Sep 23, 2016

And simplify them the same in both polygons

@mtirwin
Copy link

mtirwin commented Sep 24, 2016

😍

cc/ @ryanbaumann

@e-n-f
Copy link
Contributor Author

e-n-f commented Sep 26, 2016

The topology information that comes out this should also enable parcel merging (#169).

@e-n-f
Copy link
Contributor Author

e-n-f commented Sep 26, 2016

Working on this in #302

@e-n-f
Copy link
Contributor Author

e-n-f commented Sep 27, 2016

There is a missing edge at z1 with

tippecanoe -ps --simplify-polygons-together --no-polygon-splitting -f -z5 -o proper3.mbtiles ne_10m_admin_0_countries.json

screen shot 2016-09-26 at 10 53 50 pm

@e-n-f
Copy link
Contributor Author

e-n-f commented Sep 27, 2016

The missing edge also happens without this new code even running.

grep Russia ne_10m_admin_0_countries.json | time ./tippecanoe -ps --no-polygon-splitting -f -Z1 -z1 -o separate.mbtiles

@e-n-f
Copy link
Contributor Author

e-n-f commented Sep 27, 2016

And the missing edge ends up in a different place in the partition branch, even though the output polygon ultimately contains the same points.

One suspicious thing is that Russia here is a polygon ring with 17393 points, which is quite large, and there are strange rendering artifacts as you zoom in. I wonder if GL has an internal limit of 16384 points per polygon ring and this is running into it.

@e-n-f
Copy link
Contributor Author

e-n-f commented Oct 17, 2016

Merged. The Russian polygon displays fine in Studio even though mbview has a hard time with it.

@e-n-f e-n-f closed this as completed Oct 17, 2016
@ryanbaumann
Copy link

@ericfischer great work! Will test this with some large workflows asap.

@e-n-f
Copy link
Contributor Author

e-n-f commented Oct 18, 2016

Hope it works for you @ryanbaumann! Please note you have to specify --detect-shared-borders to turn the feature on.

@e-n-f
Copy link
Contributor Author

e-n-f commented Oct 18, 2016

Same problem apparently came up recently in the QGIS world: http://philmikejones.me/2016/09/29/simplify-polygons-without-creating-slithers/

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

3 participants