Package org.gdal.gdal
Class TermProgressCallback
- java.lang.Object
-
- org.gdal.gdal.ProgressCallback
-
- org.gdal.gdal.TermProgressCallback
-
public class TermProgressCallback extends ProgressCallback
Class used for simple progress report to terminal.This progress reporter prints simple progress report to the terminal window. The progress report generally looks something like this:
0...10...20...30...40...50...60...70...80...90...100 - done.
Every 2.5% of progress another number or period is emitted. Note that GDALTermProgress() uses internal static data to keep track of the last percentage reported and will get confused if two terminal based progress reportings are active at the same time either in in a single thread or across multiple threads.Example :
driver.CreateCopy("dest.tif", src_ds, 0, null, new TermProgressCallback());
- Since:
- Java bindings 1.7.0
-
-
Constructor Summary
Constructors Constructor Description TermProgressCallback()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
delete()
int
run(double dfComplete, java.lang.String pszMessage)
Callback method called from long processing from GDAL methods.
-
-
-
Method Detail
-
delete
public void delete()
- Overrides:
delete
in classProgressCallback
-
run
public int run(double dfComplete, java.lang.String pszMessage)
Description copied from class:ProgressCallback
Callback method called from long processing from GDAL methods.This method is called back with the progression percentage. Its return value is used by the caller to determine whether the processing should go on or be interrupted.
This method should be subclassed by classes subclassing ProgressCallback.
- Overrides:
run
in classProgressCallback
- Parameters:
dfComplete
- progression percentage between 0 and 1pszMessage
- processing message, may be null- Returns:
- 0 if you want to interrupt the processing, any value different from 0 to go on
-
-