Skip to content

Add STAC catalog and collection endpoints#55

Merged
mrshll merged 4 commits intomainfrom
add-stac-catalog
Mar 30, 2026
Merged

Add STAC catalog and collection endpoints#55
mrshll merged 4 commits intomainfrom
add-stac-catalog

Conversation

@mrshll
Copy link
Copy Markdown
Member

@mrshll mrshll commented Mar 27, 2026

Summary

  • Adds static STAC (SpatioTemporal Asset Catalog) JSON generation at build time for machine-readable dataset discovery
  • Root catalog at /stac/catalog.json lists all live datasets; per-dataset collection pages at /stac/{dataset_id}/collection.json include Zarr and Icechunk asset links
  • Computes Icechunk storage config for datasets that have Icechunk notebooks

Test plan

  • Run npm run build and verify docs/stac/catalog.json is valid JSON with correct child links
  • Verify individual collection files (e.g. docs/stac/noaa-gfs-analysis-hourly/collection.json) contain correct assets and metadata
  • Validate output against STAC spec (e.g. via stac-validator)

Generate static STAC (SpatioTemporal Asset Catalog) JSON at build time,
providing a machine-readable API for dataset discovery. Adds a root
catalog at /stac/catalog.json and per-dataset collection pages with
Zarr and Icechunk asset links.
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Mar 27, 2026

Deploying dynamical-org with  Cloudflare Pages  Cloudflare Pages

Latest commit: d70768c
Status: ✅  Deploy successful!
Preview URL: https://bcf14c32.dynamical-org.pages.dev
Branch Preview URL: https://add-stac-catalog.dynamical-org.pages.dev

View logs

@mrshll mrshll self-assigned this Mar 27, 2026
@mrshll mrshll requested a review from aldenks March 27, 2026 20:13
mrshll added 2 commits March 27, 2026 15:31
Populates cube:dimensions and cube:variables from zarr metadata
already fetched at build time. Spatial dimensions get extents from
bbox, temporal dimensions are typed, and all variables include their
dimension references and units.
The datacube extension schema requires extent on all dimension types.
Without it, stac-validator rejects the collections.
.eleventy.js Outdated
Comment on lines +259 to +261
const isGlobal =
entry.spatial_domain && entry.spatial_domain.includes("Global");
const bbox = isGlobal ? [-180, -90, 180, 90] : [-125, 24, -66, 50];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude! (this is just hardcoded lol)

.eleventy.js Outdated
"cube:variables": cubeVariables,
extent: {
spatial: { bbox: [bbox] },
temporal: { interval: [["2000-01-01T00:00:00Z", null]] },
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

claude! no hardcoding

Use statistics_approximate attributes from zarr coordinate arrays
instead of hardcoded bbox and temporal start values.
@mrshll mrshll merged commit 81c400d into main Mar 30, 2026
3 checks passed
@mrshll mrshll deleted the add-stac-catalog branch March 30, 2026 14:50
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.

2 participants