Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeoTransform as implemented by GDAL #19

Merged
merged 6 commits into from
Nov 4, 2024
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion geozarr-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ GeoZarr DataArray variable MUST include the attribute **\_ARRAY_DIMENSIONS which

### GeoZarr Coordinates

GeoZarr Coordinates variable is a one dimensional **Zarr Array** that **indexes a dimension** of a GeoZarr DataArray (e.g latitude, longitude, time, wavelength).
GeoZarr Coordinates variable is either a one dimensional **Zarr Array** or an empty **Zarr Array** containing a **grid_mapping** which includes a **GeoTransform**. In both cases, the coordinates **index a dimension** of a GeoZarr DataArray (e.g latitude, longitude, time, wavelength).

GeoZarr Coordinates variable MUST include the attribute **\_ARRAY_DIMENSIONS equal to the Zarr array name** (e.g. latitude for the latitude Zarr Array).

Expand Down Expand Up @@ -75,6 +75,13 @@ The following standard names are recommended to describe coordinates variables f

The **grid_mapping** CF variable defined by DataArray variable defines the coordinate reference system (CRS) used for the horizontal spatial coordinate values. The grid_mapping value indicates the Auxliary variable that holds all the CF attribute describing the CRS.

In GeoZarr, the grid_mapping variable can contain a **GeoTransform** attribute. A GeoTransform is a vector of six double precision digits: [X_offset, X0, X1, Y_offset, Y0, Y1] `X_offset` and `Y_offset` are the grid origin. `X0` and `Y0` are the grid spacing per column. `X1` and `Y1` are the grid spacing per row. If `X0 = Y1 = 0`, the grid is axis aligned. In GeoZarr, coordinates are always always aligned with a cell center and it is left to a data user to decide if values are constant across a cell or valid only at the precise cell cetner. The following equations can be used to create derive georeferenced cell centers.
dblodgett-usgs marked this conversation as resolved.
Show resolved Hide resolved

```
X_georeference = X0 * column + X1 * row + X_offset
Y_georeference = Y0 * column + Y1 * row + Y_offset
```

### Other CF Properties

All other CF conventions are recommended, in particular the attributes below:
Expand Down