Skip to content

spatial:shape on multiscale parent groups #355

Open

Description

@emmanuelmathot

Reported in #349 (G3).

The five multiscale parent groups (/measurements/reflectance, /quality/atmosphere, /quality/probability, /conditions/mask/l1c_classification, /conditions/mask/l2a_classification) have spatial:transform of the finest level, but no spatial:shape. Without the shape, a reader cannot tell what the transform applies to.

generic_multiscales gives the shape to grid_spatial_attrs (s2_optimization/s2_multiscale.py:465-468). grid_spatial_attrs uses it to compute the bbox, but it does not write spatial:shape (s2_multiscale.py:490-511).

Proposal

Write spatial:shape in grid_spatial_attrs. This also fixes the other callers.

Also discussed in zarr-conventions/spatial#31 and zarr-conventions/spatial#32 (one source for each spatial: property).

Tests

Regenerate the S2 snapshots. Add a test: each group with spatial:transform also has spatial:shape.

Activity

  1. changed the title [-]#TBD-02 `spatial:shape` on multiscale parent groups[/-] [+]`spatial:shape` on multiscale parent groups[/+] on Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmultiscalesMultiscale pyramids and overviews

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions