Skip to content
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

IReadBlock failed #327

Open
drnextgis opened this issue Jun 13, 2023 · 0 comments
Open

IReadBlock failed #327

drnextgis opened this issue Jun 13, 2023 · 0 comments

Comments

@drnextgis
Copy link
Contributor

drnextgis commented Jun 13, 2023

In some circumstances this code leads to an error:

from telluric import GeoRaster2
from rasterio.windows import Window

w = Window(col_off=265876, row_off=182960, width=394, height=602)
raster = GeoRaster2.open("s3://.../dem.tif")
raster.get_window(w, masked=False)
Process failed. Error: GeoRaster2IOError(RasterioIOError('Read or write failed. /vsis3/.../dem.tif, band 1: IReadBlock failed at X offset 259, Y offset 178: _TIFFPartialReadStripArray:Cannot read offset/size for strile around ~225607'))

We were not able to reproduce the issue with rasterio only so apparently it is a telluric issue:

window = Window(col_off=265876, row_off=182960, width=394, height=602)
with rasterio.open("s3://.../dem.tif") as src:
    image = src.read(1, window=window)
    image = (image / 10).astype(np.float32)  # correct weird int32 dtype
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant