[gdal-dev] Intermittent raster read/write error

Jon Morris Jon.Morris at jbarisk.com
Fri Mar 15 08:19:49 PDT 2019


Great. Many thanks for the quick fix and for all your great work so far!

Jon

-----Original Message-----
From: Even Rouault <even.rouault at spatialys.com>
Sent: 14 March 2019 16:17
To: gdal-dev at lists.osgeo.org
Cc: Jon Morris <Jon.Morris at jbarisk.com>
Subject: Re: [gdal-dev] Intermittent raster read/write error

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
T +44 (0) 1756 799919
www.jbarisk.com<http://www.jbarisk.com>

[Visit our website]<http://www.jbarisk.com> [http://www.jbagroup.co.uk/imgstore/JBA-Email-Sig-Icons-LINKEDIN.png] <https://www.linkedin.com/in/jon-morris-a2897b4/>  [Follow us on Twitter] <https://twitter.com/jbarisk>


More information about the gdal-dev mailing list