Skip to content

How should a render fix the non-spatial dimensions of a datacube asset? #19

Description

@lhoupert

For multidimensional assets (e.g. Zarr) this extension is missing something to fix the non spatial dimensions to render 2D slices (which time step, which depth level, etc...). From what I saw, today this is done outside STAC. For example in EOPF Explorer, eodash carries an eodash:rasterform link with ${...} templating, and titiler takes it as sel=time=….

I added here a user case from the EOPF Sentinel Zarr Explorer (EOPF-Explorer/data-pipeline#385, background in EOPF-Explorer/data-pipeline#348): a Sentinel-1 RTC cube Item exposes its ascending and descending groups as two assets, each with its own time axis and vv/vh bands. assets fixes the groups but nothing fixes time, and the two axes differ, so a client that resolves time against the wrong group's axis requests a slice that does not exist.

proposal

We could add an optional selection object to the render object. Each key is a cube:dimensions key, looked up on the assets named in assets first, then on the Item, then on the Collection. A render without selection is unchanged, so 2D use is unaffected.

"assets": {
  "gamma0-rtc-backscatter-asc": {
    "href": "s3://…/T30VWJ.zarr/ascending",
    "roles": ["data"],
    "bands": [{ "name": "vv" }, { "name": "vh" }],
    "cube:dimensions": {
      "time": { "type": "temporal", "extent": ["2026-06-24T17:08:16Z", "2026-07-04T05:33:02Z"], "values": ["2026-06-24T17:08:16Z", "…"] }
    }
  }
},
"renders": {
  "vv-ascending": {
    "assets": ["gamma0-rtc-backscatter-asc"],
    "bidx": [1],
    "rescale": [[0, 0.5]],
    "selection": {
      "time": { "default": "last" }
    }
  }
}

default is a required field (string) and correspond to the value used when the client does not choose one. It could be a literal in the dimension's type (ISO 8601 for temporal), or first / last, resolved against the dimension's values or extent.

What are your thoughts @vincentsarago and @A-Behairi ?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions