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

Jon

-----Original Message-----
From: Even Rouault <[email protected]>
Sent: 14 March 2019 16:17
To: [email protected]
Cc: Jon Morris <[email protected]>
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>
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to