[gdal-dev] GDALProgressFunc in RasterIO not called

Even Rouault even.rouault at spatialys.com
Wed Apr 11 03:50:30 PDT 2018


On mercredi 11 avril 2018 02:03:27 CEST r.boeters wrote:
> I'm using  GDALDataset::RasterIO(..)
> <http://www.gdal.org/classGDALDataset.html#a80d005ed10aefafa8a55dc539c2f69da
> > to read WMS/WMTS/ECW. So not per band, nor per block.
> 
> I want to be able to terminate this process, so I thought I could pass a
> GDALProgressFunc function to get intermediate status updates and return
> false if the user aborts the process. However my GDALProgressFunc is never
> called.
> 
> The GDALProgressFunc is defined as this:
> 
> 
> 
> Partial code where I'm reading the data (reading the data works fine, I get
> the image; just the progress function is never called):
> 
> 
> Am I missing anything? Or are reports to the progress function not
> implemented for WM(T)S and ECW?

The progress function is certainly used in the generic block-based reading 
code of GDAL core, but much less in driver specific code.

>From what I can see by grepping pfnProgress, it is not used by the WMS and 
WMTS driver

But I do see it used in the ECW driver in a number of places. But there are 
numerous code paths in it, so perhaps not in the one you trigger.

You'll have to dig more. Improvements welcome.

Eve

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


More information about the gdal-dev mailing list