[gdal-dev] GDALProgressFunc in RasterIO not called
r.boeters
roeland.boeters at sweco.nl
Wed Apr 11 02:05:25 PDT 2018
I'm so sorry, the code got lost....
The GDALProgressFunc is defined as this:
int gdalProgressFunc(double dfComplete, const char *pszMessage, void
*pProgressArg)
{
NLogger::LogMessage(Fasc(), NLogger::Info, "gdalProgressFunc called");
return 1;
}
Partial code where I'm reading the data (reading the data works fine, I get
the image; just the progress function is never called):
UINT32 *buf = (UINT32 *)
CPLMalloc(sizeof(UINT32)*nSDestXD*nSDestYD*rasterbands);
GDALRasterIOExtraArg arg;
INIT_RASTERIO_EXTRA_ARG(arg);
QString data = "test";
arg.pfnProgress = (GDALProgressFunc)gdalProgressFunc;
arg.pProgressData = &data;
if (m_gdalDataset->RasterIO(GDALRWFlag::GF_Read, pxLeft, pyTop, abs(pxRight
- pxLeft), abs(pyTop-pyBottom), buf, nSDestXD, nSDestYD,
GDALDataType::GDT_UInt32, rasterbands, nullptr, 0, 0, 0, &arg) != CE_None)
{
CPLFree(buf);
return;
}
--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
More information about the gdal-dev
mailing list