-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
There are a couple GDAL test images that I couldn't figure out how to decode properly in #12. Here's how to replicate the issue outside pytest:
Failure 1
from obstore.store import LocalStore
from virtual_tiff.reader import create_manifest_store
import zarr
import rioxarray
import numpy as np
filepath = "float32_LZW_predictor_2.tif"
ms = create_manifest_store(
filepath=filepath, group="0", store = LocalStore()
)
a = zarr.open_array(ms, mode="r", zarr_format=3, path="0")
observed = a[:]
expected = rioxarray.open_rasterio(filepath).data.squeeze()
np.testing.assert_allclose(observed, expected)Failure 2
from obstore.store import LocalStore
from virtual_tiff.reader import create_manifest_store
import zarr
import rioxarray
import numpy as np
filepath = "test_hgrid_with_subgrid.tif"
ms = create_manifest_store(
filepath=filepath, group="0", store = LocalStore()
)
a = zarr.open_array(ms, mode="r", zarr_format=3, path="0")
observed = a[:]
expected = rioxarray.open_rasterio(filepath)[0]
expected = expected[filepath.replace("/", "_").lstrip("_")]
expected = expected.data.squeeze()
np.testing.assert_allclose(observed, expected)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels