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

Sharding invalid geometries #9

Open
missinglink opened this issue Jul 11, 2019 · 0 comments
Open

Sharding invalid geometries #9

missinglink opened this issue Jul 11, 2019 · 0 comments
Labels
bug Something isn't working

Comments

@missinglink
Copy link
Member

missinglink commented Jul 11, 2019

The 'shard' process halves a geometry (alternating horizontally & vertically) until each shard complexity is below a fixed threshold.
This ensures that the PIP performance is fast and linear.

This process is tested and works well, however, I have seen some geometries which fail to split due to topology errors.
It's pretty rare, it doesn't affect any WOF geometries and less than 1 in 10,000 OSM geometries.

I'll open up a separate issue related to repairing invalid geometries, but this issue is simply to handle the case where sharding fails due to a topology error.

In the case where a shard fails to half, we should:

  • discard both of the two child halves (the ones created at level+1)
  • do not delete the parent shard (the one at level)

I attempted to fix this in the past but for some reason IsValid() is returning 1 despite the shard geom being invalid.
It might be that spatialite@5 is better at handling this because it uses LIBRTTOPO instead of GEOS.

@missinglink missinglink added the bug Something isn't working label Jul 11, 2019
This was referenced Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant