Module: |
gt-idl-process |
|
Module Maintainer: |
||
Status: |
|
|
Email Help: |
Geotools-gt2-users@lists.sourceforge.net |
|
Volunteer: |
geotools-devel@lists.sourceforge.net |
|
IP Review: |
Allow exposing IDL algorithms/functions as geotools processes.
The module has been previously used as a dependency of a custom Geoserver 1.7. Our aim is to setup all we need to let it work on GeoServer's (2.0) WPS too.
IP Check: review.txt added, all headers are in place
Releasable: ...
Quality Assurance: ...
Stability: No planned API changes
Supported: Documentation available/Javadoc in place, module maintainer does watches user list, answers email.
IP review is underway - known issue:http://svn.osgeo.org/geotools/trunk/modules/unsupported/idl-process/src/site/apt/review.apt
Remember that the module maintainer is a volunteer, and if you can help test this module please jump on the developers list and help out. Patches may be attached to the above issues for review by the module maintainer.
package org.geotools.process.idl.impl;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
import org.geotools.process.Process;
import org.geotools.process.ProcessException;
import org.geotools.test.TestData;
import org.junit.Assert;
/**
* Simple test class leveraging on the Feature Extraction function, offered by
* means of the proper IDL wrapper.
*/
public class IDLProcessTest{
public void testFeatureExtractionProcess() throws InterruptedException,
FileNotFoundException, IOException, ProcessException {
final IDLFeatureExtractionProcessFactory factory = new IDLFeatureExtractionProcessFactory();
final Process process = factory.create();
File testData = TestData.file(this, "testin.tif");
final Map<String, Object> values = new LinkedHashMap<String, Object>(2);
values.put("input_data", testData.getAbsolutePath());
Map<String, Object> result = null;
result = process.execute(values, null);
if (result != null && !result.isEmpty()) {
final Iterator<String> keysIt = result.keySet().iterator();
final Object output = result.get(keysIt.next());
Assert.assertNotNull(output);
}
}
}
|