Skip to content

How to represent affine transform in geozarr 0.4? #68

@geospatial-jeff

Description

@geospatial-jeff

I'm working on converting some TIFF files to geozarr and I'm not sure how to represent the affine transform (what GDAL calls a "geotransform") in geozarr. The 0.4 spec does mention (see here):

Affine transformation is specified via the GeoTransform attribute or equivalent structures.

However it fails to mention how the user should actually represent the affine transformation within this GeoTransform attribute. The link to the conformance class fails to resolve too - https://www.opengis.net/spec/geozarr/1.0/conf/geotransform (note I tried replacing 1.0 with 0.4 as well). After searching through the repo I did find the geozarr-spec.md file which suggests:

In GeoZarr, the grid_mapping variable can contain a GeoTransform attribute adopted from the GDAL Raster Data Model. A GeoTransform is six values: "X_offset X0 X1 Y_offset Y0 Y1 " encoded as a space delimited string to ensure interoperability with existing software. X_offset and Y_offset are the grid origin.

While this is promising it is still unclear to me the relationship between geozarr-spec.md and the HTML version of the spec. They seem to disagree on several points. For example:

  • The geozarr-spec.md file says that the affine transform should be included as an attribute on the grid_mapping variable, while the HTML spec does not make this distinction. It seems that grid_mapping and geotransform are actually separate conformance classes in the HTML spec. The HTML spec also does not go into any detail on the relationship between these two conformance classes.
  • The geozarr-spec.md file says that you MUST use _ARRAY_DIMENSIONS to set coordinate variables while the HTML version of the spec says you MAY either use _ARRAY_DIMENSIONS or dimension_names.

These subtle differences between the two documents further obscure how I should be representing an affine transform in geozarr. The geozarr-spec.md file seems to have the most complete explanation but never is it explained what this file is and how it should be interpreted alongside the HTML spec.

Thanks for the help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions