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

write does not necesserily respect shapefile winding spec #107

Open
rafaqz opened this issue Apr 1, 2024 · 1 comment
Open

write does not necesserily respect shapefile winding spec #107

rafaqz opened this issue Apr 1, 2024 · 1 comment
Assignees
Labels

Comments

@rafaqz
Copy link
Member

rafaqz commented Apr 1, 2024

We are currently just calling getring and assuming they have the correct winding. Which will often not be true.

Probably a pretty serious bug.

I guess we need to detect the winding order of each ring in _get_parts for holes and exteriors separately, and then iterate either forwards or in reverse over the points depending.

@rafaqz rafaqz added the bug label Apr 1, 2024
@rafaqz
Copy link
Member Author

rafaqz commented Jun 13, 2024

We already have _isclockwise here we just need to run it on every ring as we stream the write, flipping the order we do GI.getpoint depending on the current order and if we need a hole or exterior. Maybe only a few extra lines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant