Package org.geotools.process.feature
Class AbstractFeatureCollectionProcess
- Object
-
- AbstractProcess
-
- AbstractFeatureCollectionProcess
-
- All Implemented Interfaces:
Process
- Direct Known Subclasses:
FeatureToFeatureProcess
public abstract class AbstractFeatureCollectionProcess extends AbstractProcess
A Process for feature collections.- Since:
- 2.6
- Author:
- Justin Deoliveira, OpenGEO, Michael Bedward
-
-
Field Summary
-
Fields inherited from class AbstractProcess
factory
-
-
Constructor Summary
Constructors Constructor Description AbstractFeatureCollectionProcess(AbstractFeatureCollectionProcessFactory factory)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description protected abstract void
processFeature(SimpleFeature feature, Map<String,Object> input)
Performs an operation on a single feature in the collection.
-
-
-
Constructor Detail
-
AbstractFeatureCollectionProcess
public AbstractFeatureCollectionProcess(AbstractFeatureCollectionProcessFactory factory)
Constructor
-
-
Method Detail
-
processFeature
protected abstract void processFeature(SimpleFeature feature, Map<String,Object> input) throws Exception
Performs an operation on a single feature in the collection.This method should do some work based on the feature and then set any attributes on the feature as necessary. Example of a simple buffering operation:
protected void processFeature(SimpleFeature feature, Map<String, Object> input) throws Exception { Double buffer = (Double) input.get( BufferFeatureCollectionFactory.BUFFER.key ); Geometry g = (Geometry) feature.getDefaultGeometry(); g = g.buffer( buffer ); feature.setDefaultGeometry( g ); }
- Parameters:
feature
- the feature being processedinput
- a Map of input parameters- Throws:
Exception
-
-