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

Don't allow continuous polygons to collapse into dust #155

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

e-n-f
Copy link
Collaborator

@e-n-f e-n-f commented Oct 20, 2023

With the --no-simplification-of-shared-nodes option, shard gaps could still be introduced between polygons through interaction with the collapse of tiny polygons into polygon dust. This PR prevents polygons that have been determined to share a border with another polygon from collapsing into dust.

Affected test

tests/ne_110m_admin_0_countries/out/-D8_-d8_-z1_-yname_--no-simplification-of-shared-nodes.json:

Before:

Screenshot 2023-10-20 at 11 36 55 AM

After:

Screenshot 2023-10-20 at 11 37 41 AM

@e-n-f e-n-f marked this pull request as ready for review October 20, 2023 23:06
Copy link

@ChrisLoer ChrisLoer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Erica and I have talked this through, with two things worth noting:

  • Because continuous polygons can't dustify anymore, that means there will be more cases where tippecanoe gets pushed into coalescing continuous polygons, which is potentially more expensive. Erica plans to time the Texas census blocks case before and after the change to get an idea for how much impact that might make.
  • Any contact of a multipolygon with another polygon makes the whole multi-polygon non-dustable, but this seems unnecessary in most cases and can have unintuitive results (the case that got us talking about it: why are Papua New Guinea's islands preserved but the next door Solomon Islands discarded). But this goes in the "further refinements" bucket, not a blocker at all.

@ChrisLoer
Copy link

For manual testing, my plan is to test within Felt on the matched Felt PR, rather than testing directly with tippecanoe.

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

Successfully merging this pull request may close these issues.

2 participants