Skip to content

Add CRS override fallback for projected x/y grids#83

Draft
eeholmes with Copilot wants to merge 4 commits into
mainfrom
copilot/improve-grid-detection
Draft

Add CRS override fallback for projected x/y grids#83
eeholmes with Copilot wants to merge 4 commits into
mainfrom
copilot/improve-grid-detection

Conversation

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

Projected x/y datasets without discoverable CRS metadata were falling back to regular lat/lon handling, which could render projected grids incorrectly. This change lets Gridlook use CRS supplied in the URL or catalog metadata when dataset metadata cannot provide it.

  • URL and catalog CRS fallback

    • Added support for ::crs=... in hash URLs.
    • Added catalog-entry CRS lookup so a matching dataset can inherit crs from catalog metadata when no explicit URL override is present.
    • Ensured catalog-derived CRS is available before initial grid detection runs.
  • Projected grid detection

    • Extended projected-grid CRS resolution to fall back in this order:
      1. dataset CRS metadata
      2. group-level projection metadata
      3. URL/catalog CRS override
    • Reused the same fallback path for grid classification and projected coordinate handling.
  • Polar stereographic handling

    • Recognize common polar EPSG overrides (EPSG:3031, EPSG:3413, EPSG:3995) as polar stereographic.
    • Derive hemisphere / pole selection from override CRS when dataset metadata is missing, so polar datasets route to the curvilinear path correctly.
  • Catalog-driven navigation

    • When opening/selecting datasets from a catalog, include the entry’s crs in the generated hash when available.

Example:

#https://data.source.coop/.../combined/AWI_PISM1/exp05::catalog=static/catalog.json::crs=EPSG:3031

This allows projected datasets with missing embedded CRS metadata to be classified and rendered using the intended projection instead of falling back to regular lat/lon behavior.

Copilot AI changed the title [WIP] Improve grid detection for x/y projected grids allowing CRS override Add CRS override fallback for projected x/y grids May 28, 2026
Copilot AI requested a review from eeholmes May 28, 2026 03:19

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor Author

@copilot Still failing to fetch.

http://localhost:3000/#icechunk+https://data.source.coop/englacial/ismip6/icechunk-ais/combined/AWI_PISM1/exp05::catalog=static/catalog.json::crs=EPSG:3031::varname...

Fixed in b64482b. Icechunk URLs now skip the JSON-index fetch path, so Gridlook no longer tries to fetch() an icechunk+... URL before loading the dataset through the Zarr/Icechunk loader.

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.

Improve grid detection for x/y projected grids: allow CRS override and pole selection via URL/catalog

2 participants