You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sedona.apache.org by "james-willis (via GitHub)" <gi...@apache.org> on 2026/06/03 21:47:37 UTC

[PR] feat(raster): accept lat/lon and latitude/longitude spatial dim names [sedona-db]

james-willis opened a new pull request, #910:
URL: https://github.com/apache/sedona-db/pull/910

   Relax the hardcoded `["y","x"]` spatial-dimension-name requirement so the CF-style `("lat","lon")` and `("latitude","longitude")` pairs are also recognized as a georeferenced 2-D layout.
   
   Most cloud-native climate/weather Zarrs follow CF and name their trailing two axes `lat`/`lon` or `latitude`/`longitude`. Today those are rejected unless the user adds an explicit `spatial:dims` escape hatch by hand, even though they are unambiguously 2-D rasters.
   
   ## Change
   
   Introduces `is_spatial_dim_pair()` / `SPATIAL_DIM_NAME_PAIRS` in `sedona-raster` as the single source of truth for the accepted `(y-like, x-like)` pairs, and routes both name-based checks through it:
   
   - `BandRef::is_2d()` — the legacy-2-D gate used by GDAL-backed SQL functions.
   - The Zarr loader's default `resolve_spatial_dim_indices` policy (the `spatial:dims` group attribute remains the escape hatch for anything outside the recognized set).
   
   Positional `width()` / `height()` / `spatial_shape` logic is unchanged: the recognized pairs stay in `(y-like, x-like)` C-order, so the row axis is still first and the column axis second.
   
   ## Tests
   
   - `is_2d()` now accepts `lat`/`lon` and `latitude`/`longitude` with an identity view; unrecognized names (e.g. `northing`/`easting`) still return false.
   - Zarr `resolve_spatial_dim_indices` accepts the new default pairs; transposed `x`/`y` is still rejected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(raster): accept lat/lon and latitude/longitude spatial dim names [sedona-db]

Posted by "zhangfengcdt (via GitHub)" <gi...@apache.org>.
zhangfengcdt merged PR #910:
URL: https://github.com/apache/sedona-db/pull/910


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@sedona.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org