Skip to content

Store the geometry label coordinates as Zarr string #356

Open

Description

@emmanuelmathot

Reported in #349 (Z1).

Three label coordinates under /conditions/geometry use data types that are not in the Zarr v3 core:

Array Shape Data type
angle 2 fixed_length_utf32
band 13 null_terminated_bytes
detector 7 null_terminated_bytes

null_terminated_bytes is not in the zarr-extensions registry (see zarr-developers/zarr-extensions#60, open). A strict reader must refuse an unknown data type. These data types come from the native CPM Zarr v3 products (reported to CPM in https://gitlab.eopf.copernicus.eu/cpm/eopf-cpm/-/work_items/1268; in Zarr v2 products the labels are unicode). Our engine passes them through without conversion.

Proposal

Before the write, cast these coordinates to Python str (numpy object or StringDType), so that zarr-python writes the registered string data type. Decode bytes as ASCII.

Impact

  • titiler-eopf reads the labels with v.decode() if bytes else str(v) (titiler/eopf/openeo/angles.py:366-374), so this works. Add a test with a variable-length string in tests/test_angles.py.
  • rio-tiler shows b'b04' today. After the change it shows b04.
  • Check that zarrita (OpenLayers) and GDAL read string.

Activity

  1. changed the title [-]#TBD-03 Store the geometry label coordinates as Zarr `string`[/-] [+]Store the geometry label coordinates as Zarr `string`[/+] on Nov 12, 2026
  2. added
    bugSomething isn't working
    sentinel-2Sentinel-2 MSI products (L1C, L2A)
    encodingData encoding: scale/offset, codecs, fill values, dtypes
    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 workingencodingData encoding: scale/offset, codecs, fill values, dtypessentinel-2Sentinel-2 MSI products (L1C, L2A)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions