Class FeatureExtender
- java.lang.Object
-
- org.hortonmachine.gears.utils.features.FeatureExtender
-
public class FeatureExtender extends Object
Utility to add attributes to existing features.- Author:
- Andrea Antonello (www.hydrologis.com)
-
-
Constructor Summary
Constructors Constructor Description FeatureExtender(org.opengis.feature.simple.SimpleFeatureType oldFeatureType, String[] fieldArray, Class<?>[] classesArray)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.opengis.feature.simple.SimpleFeatureextendFeature(org.opengis.feature.simple.SimpleFeature oldFeature, Object[] additionalAttributes)org.opengis.feature.simple.SimpleFeatureTypegetNewFeatureType()
-
-
-
Constructor Detail
-
FeatureExtender
public FeatureExtender(org.opengis.feature.simple.SimpleFeatureType oldFeatureType, String[] fieldArray, Class<?>[] classesArray) throws org.geotools.util.factory.FactoryRegistryException, org.geotools.feature.SchemaException- Parameters:
oldFeatureType- theFeatureTypeof the existing features.fieldArray- the list of the names of new fields.classesArray- the list of classes of the new fields.- Throws:
org.geotools.util.factory.FactoryRegistryExceptionorg.geotools.feature.SchemaException
-
-
Method Detail
-
getNewFeatureType
public org.opengis.feature.simple.SimpleFeatureType getNewFeatureType()
-
extendFeature
public org.opengis.feature.simple.SimpleFeature extendFeature(org.opengis.feature.simple.SimpleFeature oldFeature, Object[] additionalAttributes)- Parameters:
oldFeature- the feature from which to clone the existing attributes from.additionalAttributes- the array of attributes to add.- Returns:
- the new created feature, as merged from the old feature plus the new attributes.
-
-