-
Notifications
You must be signed in to change notification settings - Fork 3
Add Spatial Zarr Convention models and metadata #100
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
Conversation
- Introduced models for the Spatial Zarr Convention in spatial.py. - Defined SpatialConvention and SpatialConventionMetadata classes with relevant metadata. - Implemented Spatial model with fields for dimensions, bounding box, transformation type, transformation matrix, shape, and registration. - Utilized Pydantic for data validation and serialization.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces support for the latest Zarr spatial and proj conventions by adding new convention models and integrating them into the multiscale metadata generation pipeline. The changes align the codebase with the v1.0 specifications of the spatial and proj Zarr conventions, while also adding version tracking to multiscale metadata.
Key changes include:
- Introduction of spatial convention models (SpatialConventionMetadata and Spatial classes) for spatial coordinate and transformation information
- Renaming and refactoring of GeoProj to Proj to align with the proj: v1.0 convention, with API changes including removal of spatial metadata fields
- Addition of version field support to multiscale metadata models (Multiscales and MultiscaleMeta)
- Enhanced multiscale metadata generation in s2_multiscale.py with improved error handling for bounds/transform calculation and integration of spatial/proj convention attributes
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| src/eopf_geozarr/data_api/geozarr/spatial.py | New file defining Spatial convention models with SpatialConventionMetadata and Spatial classes for v1 spatial metadata |
| src/eopf_geozarr/data_api/geozarr/geoproj.py | Refactored from GeoProj to Proj convention v1.0, renamed classes, updated URLs to v1 tags, removed spatial metadata fields from Proj class |
| src/eopf_geozarr/data_api/geozarr/multiscales/zcm.py | Added version field to Multiscales and MultiscalesJSON to support version tracking |
| src/eopf_geozarr/data_api/geozarr/multiscales/geozarr.py | Added version field to MultiscaleMeta to enable version specification in metadata |
| src/eopf_geozarr/s2_optimization/s2_multiscale.py | Enhanced with spatial/proj convention integration, improved transform/bounds calculation with fallbacks, fixed layout generation logic, and added convention metadata to multiscale groups |
| .vscode/launch.json | Reformatted with consistent 2-space indentation and argument line breaks (IDE configuration) |
Comments suppressed due to low confidence (3)
src/eopf_geozarr/s2_optimization/s2_multiscale.py:469
- This assignment to 'transform' is unnecessary as it is redefined before this value is used.
This assignment to 'transform' is unnecessary as it is redefined before this value is used.
transform = list(rio_transform)[:6] # Get 6 coefficients
src/eopf_geozarr/s2_optimization/s2_multiscale.py:483
- This assignment to 'transform' is unnecessary as it is redefined before this value is used.
This assignment to 'transform' is unnecessary as it is redefined before this value is used.
transform = [pixel_size_x, 0.0, x_min, 0.0, -pixel_size_y, y_max]
src/eopf_geozarr/s2_optimization/s2_multiscale.py:437
- 'except' clause does nothing but pass and there is no explanatory comment.
except Exception:
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…nventionMetadata in s2_multiscale.py
…ntion metadata for S2A, S2B, and S2C examples
…for improved consistency
…in write_geo_metadata function
…ozarr example JSON files
...optimized_geozarr_examples/S2B_MSIL1C_20250113T103309_N0511_R108_T32TLQ_20250113T122458.json
Outdated
Show resolved
Hide resolved
…transform entries
@d-v-b, this is to align latest zarr conventions in the current converter. If #92 is successful and integrates also the latest zarr conventrion then this one will not be necessary