[gdal-dev] Intermittent raster read/write error

Even Rouault even.rouault at spatialys.com
Thu Mar 14 09:17:17 PDT 2019


Jon,

> Is there a better way to determine that a write has failed? We've enabled
> gdal.UseExceptions, but if you call rb.WriteArray() on a read-only dataset,
> no error is raised. There is a write to stderr, but no exception.

The RasterIO() method called by WriteArray() didn't check access mode, so for 
small enough write w.r.t GDAL block cache, the error was only caught when 
dirty blocks in cache were actually written to storage by explicit 
FlushCache() or dataset closing.
I've a candidate fix https://github.com/OSGeo/gdal/pull/1364 to address that.

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list