-
Notifications
You must be signed in to change notification settings - Fork 10
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
Example zarr files for interoperability testing #36
Comments
netcdf-like 4-d data: http://tinyurl.com/4dzarr Note: the bounds variables for this zarr store are weird because I used xarray and it doesn't understand bounds variables. |
This is a very small, toy zarr store with no compression. It is netcdf-like: |
Zarr store with |
My initial thoughts, I have a lot more to explore here and I'll do that with examples via code and visualizations. geotiff-likecertainly has the geotransform and the CRS, but these are not picked up and registered up GDAL (note that the Metadata is just "bag of metadata", until it's registered in the GDAL model).
I think the transform is in "rasterio" form and not GDAL form, I think that's not a good idea but I don't know how most formats do that. GDAL geotransform:
rasterio geotransform is a different order: import rasterio
rasterio.Affine(3,0,696000,0,-3,4536000)
Affine(3.0, 0.0, 696000.0,
0.0, -3.0, 4536000.0)
rasterio.Affine(3,0,696000,0,-3,4536000).to_gdal()
(696000.0, 3.0, 0.0, 4536000.0, 0.0, -3.0) crs_enabled_zarr_and_tif.zipthis one looks good
(much) more to come while I get up to speed. I have realized that there's two things going on, Zarr now should be understood by GDAL better, there will certainly be fixes to be made in that software, and that will flow into QGIS (though there might be Q-specific features that also interact). There is plenty of Zarr in the world that won't have a transform, and GDAL will still work well with that. Having geo-zarr is really a new set of features for it to support, and I hope it stays aligned with xarray PR 9543 before constructing much new stuff. I'm interested that the two examples above seem to have different ways of encoding the transform and crs, so I'll explore how that's done. |
ah, I get it, the "_CRS" attribute name is defined here: https://github.com/OSGeo/gdal/blob/f5076e774a8f43ec4ac7a6d8c234efe870dcc32a/frmts/zarr/zarr.h#L30 there is no "_TRANSFORM" attribute yet known to GDAL. Should it? Should it use rasterio transform ordering or GDAL transform ordering? (I'll explore this) The _CRS is picked up by GDAL from the some.zarr, but not from the planet-fusion zarr, I don't know why yet. The transform is not present in some.zarr, that is registered because GDAL has heuristics to determine the transform from the coordinates. But the planet-fusion zarr doesn't have these, and GDAL doesn't know about "_TRANSFORM". (sorry a lot of this is maybe obvious but I'll keep notes as I pivot in in case they're helpful to others) |
Some example files to use for testing:
netcdf like data: http://tinyurl.com/GLDAS-NOAH025-3H
geotiff like data: https://storage.googleapis.com/pl-amit-public/geozarr/planet-fusion.zarr.zip
The text was updated successfully, but these errors were encountered: