Skip to content

Conversation

@emmanuelmathot
Copy link
Contributor

  • 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.

@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

- 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.
Copy link
Contributor

Copilot AI left a 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.

@emmanuelmathot emmanuelmathot linked an issue Dec 17, 2025 that may be closed by this pull request
@emmanuelmathot emmanuelmathot requested a review from d-v-b December 17, 2025 09:59
@emmanuelmathot emmanuelmathot requested a review from d-v-b December 17, 2025 16:36
@emmanuelmathot emmanuelmathot merged commit 8bcea61 into main Dec 18, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Early adoption of geo-proj Zarr convention

2 participants