You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import xarray as xr
import zarr
from rio_tiler.io import COGReader
read zarr
ds = xr.open_zarr(r'D:\work\data\test.zarr')
I want to read zarr by COGReader, but Error !!!
with COGReader(None,dataset=ds) as image:
img = image.read()
#################################
Traceback (most recent call last):
File "D:\python\zarr\test.py", line 43, in
with COGReader(None,dataset=ds) as image:
File "", line 16, in init
File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\rio_tiler\io\cogeo.py", line 135, in attrs_post_init
self.bounds = tuple(self.dataset.bounds)
File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\xarray\core\common.py", line 256, in getattr
raise AttributeError(
AttributeError: 'Dataset' object has no attribute 'bounds'
The text was updated successfully, but these errors were encountered:
Rio-tiler only accept rasterio object not fsspec ones.
Have a look on the cogeotiff/rio-tiler-fs project
Also there is no guarantee that rio-tiler will fully support Zarr dataset because GDAL support is somehow complicated (it splits the dataset in subdataset only for dataset with more than 2 dim)
import xarray as xr
import zarr
from rio_tiler.io import COGReader
read zarr
ds = xr.open_zarr(r'D:\work\data\test.zarr')
I want to read zarr by COGReader, but Error !!!
with COGReader(None,dataset=ds) as image:
img = image.read()
#################################
Traceback (most recent call last):
File "D:\python\zarr\test.py", line 43, in
with COGReader(None,dataset=ds) as image:
File "", line 16, in init
File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\rio_tiler\io\cogeo.py", line 135, in attrs_post_init
self.bounds = tuple(self.dataset.bounds)
File "C:\Users\dell\AppData\Roaming\Python\Python39\site-packages\xarray\core\common.py", line 256, in getattr
raise AttributeError(
AttributeError: 'Dataset' object has no attribute 'bounds'
The text was updated successfully, but these errors were encountered: