Package org.geotools.feature.visitor
Class SumAreaVisitor
- Object
-
- SumVisitor
-
- SumAreaVisitor
-
- All Implemented Interfaces:
FeatureVisitor
,FeatureAttributeVisitor
,FeatureCalc
public class SumAreaVisitor extends SumVisitor
Calculates the Sum of Areas for geometric fields- Author:
- Mauro Bartolomeoli
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class SumVisitor
SumVisitor.SumResult, SumVisitor.SumStrategy
-
-
Constructor Summary
Constructors Constructor Description SumAreaVisitor(int attributeTypeIndex, SimpleFeatureType type)
SumAreaVisitor(String attrName, SimpleFeatureType type)
SumAreaVisitor(Expression expr)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<List<Class>>
getResultType(List<Class> inputTypes)
Returns the expected output type given the input type.void
visit(Feature feature)
Visit the provided feature.void
visit(SimpleFeature feature)
-
Methods inherited from class SumVisitor
getExpression, getExpressions, getResult, getSum, init, reset, setStrategy, setValue
-
-
-
-
Constructor Detail
-
SumAreaVisitor
public SumAreaVisitor(Expression expr) throws IllegalFilterException
- Throws:
IllegalFilterException
-
SumAreaVisitor
public SumAreaVisitor(int attributeTypeIndex, SimpleFeatureType type) throws IllegalFilterException
- Throws:
IllegalFilterException
-
SumAreaVisitor
public SumAreaVisitor(String attrName, SimpleFeatureType type) throws IllegalFilterException
- Throws:
IllegalFilterException
-
-
Method Detail
-
visit
public void visit(SimpleFeature feature)
- Overrides:
visit
in classSumVisitor
-
visit
public void visit(Feature feature)
Description copied from interface:FeatureVisitor
Visit the provided feature.Please consult the documentation for the FeatureCollection you are visiting to learn more - the provided feature may be invalid, or read only.
- Specified by:
visit
in interfaceFeatureVisitor
- Overrides:
visit
in classSumVisitor
-
getResultType
public Optional<List<Class>> getResultType(List<Class> inputTypes)
Description copied from interface:FeatureAttributeVisitor
Returns the expected output type given the input type.- Specified by:
getResultType
in interfaceFeatureAttributeVisitor
- Overrides:
getResultType
in classSumVisitor
- Parameters:
inputTypes
- The type of the input expressions
-
-