Repository navigation
Fix multipart geometry node ordering when reading and writing - #438
Merged
davidhassell merged 2 commits intoNov 5, 2026
Merged
Conversation
Contributor
|
Hi @vera-rubin - thanks for this - I shall have a look at the PR. In the mean time, could you please raise an issue, that this PR will fix? Simply copying the text in the OP here should suffice! Thanks, |
Contributor
Author
|
Done, it's #439, and this PR now links it. |
davidhassell
approved these changes
Nov 5, 2026
davidhassell
left a comment
Contributor
There was a problem hiding this comment.
Hi @vera-rubin,
This looks sensible - Thanks for putting it together. Next release is due soon, and this will be in it.
davidhassell
self-requested a review
November 5, 2026 14:20
davidhassell
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #439
Reading four polygons with two three-node exterior parts each (
node_count=[6]*4,part_node_count=[3]*8) swaps the last two polygons' nodes, and writing the field preserves the swap. CF 1.13 section 7.6 requires nodes to follow geometry and part order, so the first-part longitudes should retain their input order:We set the next part cursor to the absolute index after the last consumed part, instead of adding that index again.
The regression checks bounds and written nodes with default, netCDF4 and h5py reads, and passes alongside the existing geometry, indexed contiguous array and multiple-geometry read/write tests.
— ChipLab