Add basic STAC geometry generation from CF attrs - #105
Merged
Merged
Conversation
The xcengine stage-out code now uses the geospatial_lat_min etc. metadata attributes of a dataset (if present) to set the geometry and bbox fields of the corresponding STAC item. Other CF metadata (e.g. geospatial_bounds) are currently ignored.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #105 +/- ##
==========================================
+ Coverage 97.99% 98.03% +0.04%
==========================================
Files 6 6
Lines 699 714 +15
Branches 89 90 +1
==========================================
+ Hits 685 700 +15
Misses 9 9
Partials 5 5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Ensures compatibility with Python <3.14
If a notebook was processed without the include_directory option set, build would fail. Fixed in this commit.
Hneuschmidt
reviewed
Sep 18, 2026
Hneuschmidt
left a comment
Collaborator
There was a problem hiding this comment.
Fine, thank you for these changes.
Yogesh mentioned a bug in core.py around lines 300 - 304. With that fixed, I think the PR can be merged.
Member
Author
|
Thanks @Hneuschmidt ! I've meanwhile tracked down and fixed the (minor) bug but it's unrelated to the changes in this PR, so I'll merge this PR first and commit the fix separately. |
Member
Author
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.
The xcengine stage-out code now uses the
geospatial_lat_minetc. metadata attributes of a dataset (if present) to set thegeometryandbboxfields of the corresponding STAC item. Other CF metadata (e.g. geospatial_bounds) are currently ignored. NB: not onlyxr.Datasetbut alsopd.DataFrameandgp.GeoDataFramecan provide these attributes.Closes #104 .