|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectExpressionAbstract
DefaultExpression
FunctionExpressionImpl
AreaFunction
public class AreaFunction
modules/library/main (gt-main.jar)
Field Summary |
---|
Fields inherited from class FunctionExpressionImpl |
---|
fallback, name, params |
Fields inherited from class DefaultExpression |
---|
expressionType, permissiveConstruction |
Fields inherited from interface ExpressionType |
---|
ATTRIBUTE, ATTRIBUTE_DOUBLE, ATTRIBUTE_GEOMETRY, ATTRIBUTE_INTEGER, ATTRIBUTE_STRING, ATTRIBUTE_UNDECLARED, FUNCTION, LITERAL_DOUBLE, LITERAL_GEOMETRY, LITERAL_INTEGER, LITERAL_LONG, LITERAL_STRING, LITERAL_UNDECLARED, MATH_ADD, MATH_DIVIDE, MATH_MULTIPLY, MATH_SUBTRACT |
Fields inherited from interface Expression |
---|
NIL |
Fields inherited from interface Expression |
---|
NIL |
Constructor Summary | |
---|---|
AreaFunction()
Creates a new instance of AreaFunction |
Method Summary | |
---|---|
Object |
evaluate(Object feature)
This method checks if the object is an instance of Feature and
if so, calls through to #evaluate(Feature) . |
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. |
int |
getArgCount()
Gets the number of arguments that are set. |
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. |
Methods inherited from class FunctionExpressionImpl |
---|
accept, equals, getArgs, getExpression, getFallbackValue, getImplementationHints, getName, getParameters, getType, setArgs, setFallbackValue, setName, setParameters, toString |
Methods inherited from class DefaultExpression |
---|
accept, evaluate, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class ExpressionAbstract |
---|
eval, eval, evaluate |
Methods inherited from class Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface Expression |
---|
accept, evaluate, getValue |
Methods inherited from interface Expression |
---|
evaluate |
Methods inherited from interface Expression |
---|
evaluate |
Constructor Detail |
---|
public AreaFunction()
Method Detail |
---|
public Object evaluate(Object feature)
DefaultExpression
Feature
and
if so, calls through to #evaluate(Feature)
. This is done
to maintain backwards compatability with previous version of Expression api
which depended on Feature. If the object is not an instance of feature
the super implementation is called.
evaluate
in interface Expression
evaluate
in class DefaultExpression
public int getArgCount()
FunctionExpressionImpl
getArgCount
in interface FunctionExpression
getArgCount
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |