Skip navigation links

Package org.geotoolkit.process

Operation applied to some given data to achieve whatever analyze or model transformation.

See: Description

Package org.geotoolkit.process Description

Operation applied to some given data to achieve whatever analyze or model transformation. The interfaces are abstract enough to handle more than GIS data. Anything can be used here for whatever purpose that can be seen as a process.

This package can be seen as an integration of ISO 19115 org.opengis.metadata.lineage package with the java.util.concurrent package, completed by the ISO 19111 org.opengis.parameter package. The integration is done as below:

The following example creates a process for a task named "MyProcess" (the available process names are implementation-dependent), sets a few parameters and launches the process with progress reports sent to the console:

ExecutorService     executor = Executors.newFixedThreadPool(nThreads);
ProcessingRegistry  registry = ...; // Implementation-dependent
ProcessDescriptor   desc     = registry.getDescriptor("MyProcess");
ParameterValueGroup param    = desc.getInputDescriptor().createValue();
param.parameter("someParam1").setValue(myValue1);
param.parameter("someParam2").setValue(myValue2);
// etc. for all other parameter values...

Process process = desc.create(param);
process.addListener(new ProgressPrinter());
Future<ParameterValueGroup> task = executor.submit(process);
doSomeOtherTasksWhileTheProcessRunInBackground();
ParameterValueGroup output = task.get();
Since:
3.19
Version:
3.20
Author:
Johann Sorel (Geomatys), Martin Desruisseaux (Geomatys)
See Also:
Processing, ExecutorService

Defined in the geotk-utility module

Skip navigation links

Copyright © 2009–2017 Geotoolkit.org. All rights reserved.