public abstract class AbstractFeatureCollectionProcess extends AbstractProcess
factory| Constructor and Description |
|---|
AbstractFeatureCollectionProcess(AbstractFeatureCollectionProcessFactory factory)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
processFeature(SimpleFeature feature,
Map<String,Object> input)
Performs an operation on a single feature in the collection.
|
public AbstractFeatureCollectionProcess(AbstractFeatureCollectionProcessFactory factory)
factory - protected abstract void processFeature(SimpleFeature feature, Map<String,Object> input) throws Exception
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, Mapinput) throws Exception { Double buffer = (Double) input.get( BufferFeatureCollectionFactory.BUFFER.key ); Geometry g = (Geometry) feature.getDefaultGeometry(); g = g.buffer( buffer ); feature.setDefaultGeometry( g ); }
feature - the feature being processedinput - a Map of input parametersExceptionCopyright © 1996–2019 Geotools. All rights reserved.