[gdal-dev] Interrupt long operation
Frank Warmerdam
warmerdam at pobox.com
Mon Jan 31 11:39:22 EST 2011
On 11-01-31 04:26 AM, Stefano Moratto wrote:
> Hello,
> I need to interrupt a RasterIO and warp calls before they have been
> ended.
> The call is invoked in a background thread and It may happen that the user
> changes the requested area in the main thread (GUI) (eg. a pan/scroll operation).
Stefano,
Algorithms which take a GDALProgressFunc are likely to be interruptable.
Each time the progress function is invoked it has the opportunity to
return an indicate that the operation has been cancelled by the user.
So the warper can be canceled if you provide a customized progress
function. But RasterIO cannot since it has no progress function.
If you want IO to be interruptible you would normally do it in modest
sized chunks, though this can interfere with optimization of the IO in
some cases.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the gdal-dev
mailing list