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

added geojson-rewind and enforce correct geometry #391

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

GwydionJon
Copy link
Collaborator

This fixes #387

Copy link
Member

@dokempf dokempf left a comment

Choose a reason for hiding this comment

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

I had done some quick tests with geojson-rewind last week and it threw me some warnings that it only works correctly when the GeoJSON uses the standard conforming CRS (WSG84?). Any thoughts about this?


for i, segmentation in enumerate(segmentations):
for j, feature in enumerate(segmentation["features"]):
# print(segmentations[i])
Copy link
Member

Choose a reason for hiding this comment

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

Leftover

@@ -88,6 +92,22 @@ def __geo_interface__(self):
}


def enforce_geojson_topology(segmentations):
Copy link
Member

Choose a reason for hiding this comment

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

A docstring quickly explaining the problem would be nice here

@GwydionJon
Copy link
Collaborator Author

I have not yet gotten any warning, but you are right.
The only solution I see would be to transform the geojson back and forth or depend on the user to only provide correct geojsons

@GwydionJon
Copy link
Collaborator Author

It also seems to mess with the swap functionality.

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

Successfully merging this pull request may close these issues.

Topologically incorrect GeoJSON data makes pipeline application crash
2 participants