Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@tidwall I have added a check to prevent panics in the library, if I remove this check and you run the test, you can see the panic.
Do you have any recommendation on how we go about fixing this issue? If there are one set of coordinates with z coordinates and other without, they way the library handles it is to allocate the z coordinate values to the values that come first, instead of where the values actually should go.
I see few approaches:
Arrange the coordinates in such a way that those have a z value would go to the right place, however this might see an issue with linear ring polygons that have some z values and others don't
Assume a default z coordinate value if some have missing z values
Refactor the way we store the ex.values array so that it also knows which particular entry should get the z coordinate.