Skip to content

added geojson-rewind and enforce correct geometry#391

Open
GwydionJon wants to merge 1 commit intomainfrom
enforce-correct-geojson-topology
Open

added geojson-rewind and enforce correct geometry#391
GwydionJon wants to merge 1 commit intomainfrom
enforce-correct-geojson-topology

Conversation

@GwydionJon
Copy link
Copy Markdown
Collaborator

This fixes #387

Copy link
Copy Markdown
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
Copy Markdown
Member

Choose a reason for hiding this comment

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

Leftover

}


def enforce_geojson_topology(segmentations):
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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