[gdal-dev] GDAL_FORCE_CACHING - alters results?
Daniel.Evans at jbarisk.com
Tue Jan 28 04:16:46 PST 2020
That change in 2.4.0 looks like it's the answer. Looking at the returned data in detail, there is indeed a column of pixels which is duplicated (sampled twice) with the option set, and is replaced by an extra column on the right hand side without it set.
From: Even Rouault <even.rouault at spatialys.com>
Sent: 28 January 2020 12:03
To: gdal-dev at lists.osgeo.org
Cc: Daniel Evans <Daniel.Evans at jbarisk.com>
Subject: Re: [gdal-dev] GDAL_FORCE_CACHING - alters results?
On mardi 28 janvier 2020 11:49:01 CET Daniel Evans wrote:
> Hi all,
> I've recently tried enabling the GDAL_FORCE_CACHING option, and found
> it gives some significant improvements to TIFF/VRT read speeds.
> However, using GDAL 2.3.0, I've now found that when reading large
> VRTs, I can sometimes get subtly different values - up to about 1%
> summed difference across a 1000x1000 or so area. Is there a known
> issue in GDAL_FORCE_CACHING in this older version of GDAL, or
> alternatively have I misunderstood the use of this option and is this expected behaviour?
GDAL_FORCE_CACHING will force I/O requests to happen exactly on VRT block boundaries.
So what you observe is slight inconsistencies in results depending on the window passed to the VRT driver.
I see that 2.4.0 had a potentially related fix
"""VRT: fix source window computation that caused sub-pixel shift with non- nearest resampling"""
But if you use a warped VRT, then what you observe is somewhat expected.
gdalwarp due to approximations in some computations doesn't lead to "consistent" results if you change the output window.
Spatialys - Geospatial professional services http://www.spatialys.com
T +44 (0) 1756 799919
[Visit our website]<http://www.jbarisk.com> [http://www.jbagroup.co.uk/imgstore/JBA-Email-Sig-Icons-LINKEDIN.png] <> [Follow us on Twitter] <https://twitter.com/jbarisk>
Our postal address and registered office is JBA Risk Management Limited, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire BD23 3FD.
Find out more about us here: www.jbarisk.com<http://www.jbarisk.com/> and follow us on Twitter @JBARisk<http://twitter.com/JBARisk> and LinkedIn<https://www.linkedin.com/company/2370847?trk=tyah&trkInfo=clickedVertical%3Acompany%2CclickedEntityId%3A2370847%2Cidx%3A2-1-2%2CtarId%3A1447414259786%2Ctas%3AJBA%20RISK%20MANAGEMENT>
The JBA Group supports the JBA Trust.
All JBA Risk Management's email messages contain confidential information and are intended only for the individual(s) named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.
Please notify the sender immediately by email if you have received this email by mistake and delete this email from your system.
JBA Risk Management Limited is registered in England, company number 07732946, 1 Broughton Park, Old Lane North, Broughton, Skipton, North Yorkshire, BD23 3FD, Telephone: +441756799919
More information about the gdal-dev