developmentseed / developmentseed/cng-sandbox

feat: add dimension selection for multidimensional Zarr connections

Open
#96 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
3
Forks
0
Avg merge
2h 21m
Merged PRs (30d)
3

Description

## Summary

Add dimension selectors so users can pick which slice of non-spatial dimensions (time, pressure level, ensemble member) to view when connecting to a multidimensional Zarr store.

## Background

Zarr stores are multidimensional — beyond spatial (lat/lon), they often have time, level, and other dimensions. titiler-xarray accepts `sel` query parameters (e.g., `&sel=time=2024-01-01&sel=level=500`) to select which slice to render. Users need UI to discover and select these dimensions.

## Acceptance Criteria

- [ ] Dimension metadata (names, sizes, coordinate values) is extracted from the `/zarr/info` response
- [ ] For each non-spatial dimension (not lat/lon/x/y), a dropdown or slider appears in the connection modal or map sidebar
- [ ] Dimension selections are stored on the connection record as JSON (`dimension_selections` field)
- [ ] Tile URL includes `&sel==` for each selected dimension
- [ ] Dimensions default to the first value
- [ ] If coordinate values are available (e.g., actual dates), those are displayed rather than raw indices

## Files to Modify

- `frontend/src/components/ConnectionModal.tsx` or `frontend/src/components/RasterSidebarControls.tsx`
- `frontend/src/lib/connections/tileUrl.ts`
- `frontend/src/lib/connections/probe.ts`
- `ingestion/src/models/connection.py`
- `ingestion/src/routes/connections.py`

## Dependencies

- Depends on: `feat: add Zarr URL connection type with variable selection`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.