public class AreaFunction extends FunctionExpressionImpl
Modifier and Type | Field and Description |
---|---|
static FunctionName |
NAME |
fallback, functionName, name, params
NIL
Constructor and Description |
---|
AreaFunction()
Creates a new instance of AreaFunction
|
Modifier and Type | Method and Description |
---|---|
Object |
evaluate(Object feature)
Subclass should override, default implementation returns null.
|
double |
getArea(Geometry geometry)
Calculates and returns the area of the specified geometry.
|
protected double |
getArea(GeometryCollection geometryCollection1)
Returns the area of a GeometryCollection.
|
protected double |
getArea(MultiPolygon multiPolygon)
Returns the area of a MultiPolygon.
|
protected double |
getArea(Polygon polygon)
Returns the area of a Polygon.
|
double |
getPerimeter(Geometry geometry)
Calculates and returns the perimeter of the specified geometry.
|
protected double |
getPerimeter(GeometryCollection geometryCollection)
Returns.
|
protected double |
getPerimeter(LineString lineString)
Returns the perimeter of a LineString.
|
protected double |
getPerimeter(MultiLineString multiLineString)
Returns the perimeter of a MultiLineString.
|
protected double |
getperimeter(MultiPolygon multiPolygon)
Returns the perimeter of a MultiPolygon.
|
protected double |
getPerimeter(Polygon polygon)
Returns the perimeter of a Polygon.
|
accept, equals, functionName, getExpression, getFallbackValue, getFunctionName, getImplementationHints, getName, getParameters, hashCode, setFallbackValue, setParameters, toString
isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression
evaluate
evaluate
public static FunctionName NAME
public Object evaluate(Object feature)
ExpressionAbstract
evaluate
in interface Expression
evaluate
in class FunctionExpressionImpl
protected double getArea(GeometryCollection geometryCollection1)
geometryCollection1
- The GeometryCollection for which the area is calulated.protected double getPerimeter(GeometryCollection geometryCollection)
geometryCollection
- The GeometryCollection for which the perimeter is calulated.public double getArea(Geometry geometry)
geometry
- The Geometry to calculate the area of.public double getPerimeter(Geometry geometry)
geometry
- The Geometry to calculate the area of.protected double getArea(MultiPolygon multiPolygon)
multiPolygon
- the MultiPolygon for which the area is calculated.protected double getperimeter(MultiPolygon multiPolygon)
multiPolygon
- the MultiPolygon for which the perimeter is calculated.protected double getArea(Polygon polygon)
polygon
- the Polygon for which the area is calculated.protected double getPerimeter(Polygon polygon)
polygon
- the Polygon for which the perimeter is calculated.protected double getPerimeter(MultiLineString multiLineString)
multiLineString
- the MultiLineString for which the perimeter is calculated.protected double getPerimeter(LineString lineString)
lineString
- the LineString for which the perimeter is calculated.Copyright © 1996–2019 Geotools. All rights reserved.