Skip to content

Load EOPF multiscale HEALPix stores; drop EGI DataHub auth#1

Open
annefou wants to merge 4 commits into
healpix-geofrom
multiscale-eopf
Open

Load EOPF multiscale HEALPix stores; drop EGI DataHub auth#1
annefou wants to merge 4 commits into
healpix-geofrom
multiscale-eopf

Conversation

@annefou

@annefou annefou commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator

Goal: visualise a GRID4EARTH EOPF store directly, e.g.
https://data.grid4earth.eu/sentinel-2-l2a/S2B_MSIL2A_20250522T105619_N0511_R094_20250522T121018.zarr

Why it didn't load before

That store is Zarr v3 with consolidated metadata only at the .zarr root. A subgroup (measurements/reflectance) carries a multiscales layout whose asset paths are root-relative ("measurements/reflectance/20"), and each level group holds the bands + cell_ids but has no consolidated metadata of its own.

The existing v3 path (a) recursed into level subgroups expecting per-group metadata (none there), and (b) resolved asset as baseUrl + "/" + asset, doubling the path (…/measurements/reflectance/measurements/reflectance/20/… → 404 → "could not determine grid type").

Changes

  • Root-driven indexing (buildEopfMultiscalesIndex): when consolidated metadata is present at the root, find the multiscales group, enumerate the finest level's variables + cell_ids from the root tree, and build the index with store=<root> + dataset=<level path> (no recursion into metadata-less level groups). cell_ids is marked hidden.
  • Asset resolution against the .zarr root (zarrRoot()), fixing the path-doubling for both initial indexing and LOD switching (baseUrl is now the root).
  • Remove EGI DataHub auth: createFetchStore returns a plain FetchStore; dropped setAuthToken/getAuthToken and the token URL param in HashGlobeView. Datasets are expected to be public + CORS-enabled.

Testing

  • npm run build (vue-tsc + vite) passes.
  • ⚠️ Not yet verified in-browser (WebGL). Please deploy a preview and load the S2 store above; report rendering so we can iterate (LOD switching, grid detection, default variable/colormap).

🤖 Generated with Claude Code

annefou and others added 2 commits June 6, 2026 21:47
- Drive v3 indexing from the ROOT consolidated metadata for EOPF-style stores,
  where consolidated metadata lives only at the .zarr root and the level groups
  (under a multiscales group) have none. Find the multiscales group, enumerate the
  finest level's variables + cell_ids from the root tree, and build the index with
  store=<root> + dataset=<level path>.
- Resolve multiscales layout 'asset' paths against the .zarr root (they are
  root-relative), fixing the path-doubling that produced 404s and 'could not
  determine grid type'.
- Remove EGI DataHub token auth: createFetchStore now returns a plain FetchStore;
  drop setAuthToken and the token URL param in HashGlobeView.

Enables loading e.g. data.grid4earth.eu/sentinel-2-l2a/<product>.zarr directly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- gridTypeDetector: recognise HEALPix from the grid group's 'dggs' attribute
  (dggs.name == 'healpix'), not only a CF grid_mapping_name CRS variable.
- Healpix.vue getHealpixCRSInfo: derive nside from dggs.refinement_level
  (nside = 2**level) and the ellipsoid from dggs.ellipsoid, falling back to the
  CF crs variable when present.
- sourceIndexing (EOPF index): set datasource/grid/time store to the level-group
  URL with dataset="", so the multiscales LOD (rewriteDatasourcesUrl swaps the
  store per level) resolves variables at <level>/<var> instead of doubling the path.

Verified: data.grid4earth.eu Sentinel-2 L2A EOPF store renders in the viewer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@annefou

annefou commented Jun 6, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Verified working: the Sentinel-2 L2A EOPF store at data.grid4earth.eu now renders in the viewer (HEALPix detected from dggs, nside from dggs.refinement_level, multiscale LOD resolving per-level groups). Tested via npm run dev against the bare .zarr root URL.

annefou and others added 2 commits June 6, 2026 22:30
…ings)

Extract checkDggsHealpix, findMultiscalesLayout, and readDggsCrsInfo so getGridType,
buildEopfMultiscalesIndex and getHealpixCRSInfo stay under max-lines-per-function; apply
prettier formatting. No behaviour change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Revert before/after merge (this branch should not stay in the deploy trigger).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant