zarr-developers / geozarr-spec

This document aims to provides a geospatial extension to the Zarr specification. Zarr specifies a protocol and format used for storing Zarr arrays, while the present extension defines conventions and recommendations for storing multidimensional georeferenced grid of geospatial observations (including rasters).
106 stars 10 forks source link

xarray/rioxarray interoperability #41

Open katyapotapov opened 4 months ago

katyapotapov commented 4 months ago

Using rioxarray, I was able to open the GLDAS dataset, but not the Planet dataset. When I opened the Planet dataset I got the following error:

import rioxarray as rxr
fusion = rxr.open_rasterio("/Users/katya/Documents/small-projects/zarr-python/planet-fusion.zarr")
File ~/micromamba/envs/zarr-v3-240207-3-11/lib/python3.11/site-packages/rasterio/env.py:451, in ensure_env_with_credentials.<locals>.wrapper(*args, **kwds)
    448     session = DummySession()
    450 with env_ctor(session=session):
--> 451     return f(*args, **kwds)

File ~/micromamba/envs/zarr-v3-240207-3-11/lib/python3.11/site-packages/rasterio/__init__.py:304, in open(fp, mode, driver, width, height, count, crs, transform, dtype, nodata, sharing, **kwargs)
    301 path = _parse_path(raw_dataset_path)
    303 if mode == "r":
--> 304     dataset = DatasetReader(path, driver=driver, sharing=sharing, **kwargs)
    305 elif mode == "r+":
    306     dataset = get_writer_for_path(path, driver=driver)(
    307         path, mode, driver=driver, sharing=sharing, **kwargs
    308     )

File rasterio/_base.pyx:312, in rasterio._base.DatasetBase.__init__()

RasterioIOError: Only arrays with numeric data types can be exposed as classic GDALDataset

This might be an issue with my environment, may try again tomorrow. Currently on the following versions:

zarr==2.16.1
rasterio==1.3.9
rioxarray==0.15.1