Package org.geotools.filter
Class AreaFunction
Object
ExpressionAbstract
DefaultExpression
FunctionExpressionImpl
AreaFunction
- All Implemented Interfaces:
Expression,Function,FunctionExpression,Factory
Area of provided geometry.
- Author:
- James
-
Field Summary
FieldsFields inherited from class FunctionExpressionImpl
fallback, functionName, name, paramsFields inherited from interface Expression
NIL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionSubclass should override, default implementation returns null.doubleCalculates and returns the area of the specified geometry.
For Polygons, this is the total area inside the external ring less the total of any contained by interior rings.protected doublegetArea(GeometryCollection geometryCollection1) Returns the area of a GeometryCollection.protected doublegetArea(MultiPolygon multiPolygon) Returns the area of a MultiPolygon.protected doubleReturns the area of a Polygon.protected doublegetperimeter(MultiPolygon multiPolygon) Returns the perimeter of a MultiPolygon.doublegetPerimeter(Geometry geometry) Calculates and returns the perimeter of the specified geometry.
For Polygons, this is the total length of the exterior ring and all internal rings.protected doublegetPerimeter(GeometryCollection geometryCollection) Returns.protected doublegetPerimeter(LineString lineString) Returns the perimeter of a LineString.protected doublegetPerimeter(MultiLineString multiLineString) Returns the perimeter of a MultiLineString.protected doublegetPerimeter(Polygon polygon) Returns the perimeter of a Polygon.Methods inherited from class FunctionExpressionImpl
accept, equals, functionName, getExpression, getFallbackValue, getFunctionName, getImplementationHints, getName, getParameters, hashCode, setFallbackValue, setParameters, toStringMethods inherited from class DefaultExpression
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpressionMethods inherited from class ExpressionAbstract
evaluateMethods inherited from interface Expression
evaluate
-
Field Details
-
NAME
-
-
Constructor Details
-
AreaFunction
public AreaFunction()Creates a new instance of AreaFunction
-
-
Method Details
-
evaluate
Description copied from class:ExpressionAbstractSubclass should override, default implementation returns null.- Specified by:
evaluatein interfaceExpression- Overrides:
evaluatein classFunctionExpressionImpl- Returns:
- default implementation returns null
-
getArea
Returns the area of a GeometryCollection.- Parameters:
geometryCollection1- The GeometryCollection for which the area is calulated.- Returns:
- The total area of all geometries in the collection.
-
getPerimeter
Returns.- Parameters:
geometryCollection- The GeometryCollection for which the perimeter is calulated.- Returns:
- the perimeter of a GeometryCollection.
-
getArea
Calculates and returns the area of the specified geometry.
For Polygons, this is the total area inside the external ring less the total of any contained by interior rings. GeometryCollections (including MultiPolygons) are iterated through so the result is the sum of all polygons anywhere within the collection. Any geometry other than Polgyon or a collection returns 0;- Parameters:
geometry- The Geometry to calculate the area of.- Returns:
- The total area of the Geometry.
-
getPerimeter
Calculates and returns the perimeter of the specified geometry.
For Polygons, this is the total length of the exterior ring and all internal rings. For LineStrings the total line length is returned. GeometryCollections are iterated through so the result is the sum of all Polygon and Line geometries anywhere within the collection. Any point geometries return a value of 0;- Parameters:
geometry- The Geometry to calculate the area of.- Returns:
- The total area of the Geometry.
-
getArea
Returns the area of a MultiPolygon.- Parameters:
multiPolygon- the MultiPolygon for which the area is calculated.- Returns:
- Total area of all polygons in multiPolygon.
-
getperimeter
Returns the perimeter of a MultiPolygon.- Parameters:
multiPolygon- the MultiPolygon for which the perimeter is calculated.- Returns:
- Total perimeter of all polygons in the multiPolygon.
-
getArea
Returns the area of a Polygon.- Parameters:
polygon- the Polygon for which the area is calculated.- Returns:
- The area of the polygon.
-
getPerimeter
Returns the perimeter of a Polygon.- Parameters:
polygon- the Polygon for which the perimeter is calculated.- Returns:
- The perimeter of the polygon.
-
getPerimeter
Returns the perimeter of a MultiLineString.- Parameters:
multiLineString- the MultiLineString for which the perimeter is calculated.- Returns:
- the total perimter (length) of the lines in multiLineString.
-
getPerimeter
Returns the perimeter of a LineString.- Parameters:
lineString- the LineString for which the perimeter is calculated.- Returns:
- the perimeter (length) of the lineString.
-