|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.filter.expression.ExpressionAbstract
org.geotools.filter.DefaultExpression
org.geotools.filter.FunctionExpressionImpl
org.geotools.filter.AreaFunction
public class AreaFunction
Field Summary |
---|
Fields inherited from class org.geotools.filter.FunctionExpressionImpl |
---|
fallback, name, params |
Fields inherited from class org.geotools.filter.DefaultExpression |
---|
expressionType, permissiveConstruction |
Fields inherited from interface org.geotools.filter.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 org.opengis.filter.expression.Expression |
---|
NIL |
Constructor Summary | |
---|---|
AreaFunction()
Creates a new instance of AreaFunction |
Method Summary | |
---|---|
java.lang.Object |
evaluate(java.lang.Object feature)
This method checks if the object is an instance of Feature and
if so, calls through to #evaluate(Feature) . |
double |
getArea(com.vividsolutions.jts.geom.Geometry geometry)
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. |
protected double |
getArea(com.vividsolutions.jts.geom.GeometryCollection geometryCollection1)
Returns the area of a GeometryCollection. |
protected double |
getArea(com.vividsolutions.jts.geom.MultiPolygon multiPolygon)
Returns the area of a MultiPolygon. |
protected double |
getArea(com.vividsolutions.jts.geom.Polygon polygon)
Returns the area of a Polygon. |
int |
getArgCount()
Gets the number of arguments that are set. |
double |
getPerimeter(com.vividsolutions.jts.geom.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 double |
getPerimeter(com.vividsolutions.jts.geom.GeometryCollection geometryCollection)
Returns. |
protected double |
getPerimeter(com.vividsolutions.jts.geom.LineString lineString)
Returns the perimeter of a LineString. |
protected double |
getPerimeter(com.vividsolutions.jts.geom.MultiLineString multiLineString)
Returns the perimeter of a MultiLineString. |
protected double |
getperimeter(com.vividsolutions.jts.geom.MultiPolygon multiPolygon)
Returns the perimeter of a MultiPolygon. |
protected double |
getPerimeter(com.vividsolutions.jts.geom.Polygon polygon)
Returns the perimeter of a Polygon. |
Methods inherited from class org.geotools.filter.FunctionExpressionImpl |
---|
accept, equals, getArgs, getExpression, getFallbackValue, getImplementationHints, getName, getParameters, getType, setArgs, setFallbackValue, setName, setParameters, toString |
Methods inherited from class org.geotools.filter.DefaultExpression |
---|
accept, evaluate, getValue, isAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpression, isMathExpression |
Methods inherited from class org.geotools.filter.expression.ExpressionAbstract |
---|
eval, eval, evaluate |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.geotools.filter.Expression |
---|
accept, evaluate, getValue |
Methods inherited from interface org.opengis.filter.expression.Expression |
---|
evaluate |
Constructor Detail |
---|
public AreaFunction()
Method Detail |
---|
public java.lang.Object evaluate(java.lang.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 org.opengis.filter.expression.Expression
evaluate
in class DefaultExpression
public int getArgCount()
FunctionExpressionImpl
getArgCount
in interface FunctionExpression
getArgCount
in class FunctionExpressionImpl
protected double getArea(com.vividsolutions.jts.geom.GeometryCollection geometryCollection1)
geometryCollection1
- The GeometryCollection for which the
area is calulated.
protected double getPerimeter(com.vividsolutions.jts.geom.GeometryCollection geometryCollection)
geometryCollection
- The GeometryCollection for which the
perimeter is calulated.
public double getArea(com.vividsolutions.jts.geom.Geometry geometry)
geometry
- The Geometry to calculate the area of.
public double getPerimeter(com.vividsolutions.jts.geom.Geometry geometry)
geometry
- The Geometry to calculate the area of.
protected double getArea(com.vividsolutions.jts.geom.MultiPolygon multiPolygon)
multiPolygon
- the MultiPolygon for which the area is calculated.
protected double getperimeter(com.vividsolutions.jts.geom.MultiPolygon multiPolygon)
multiPolygon
- the MultiPolygon for which the perimeter is
calculated.
protected double getArea(com.vividsolutions.jts.geom.Polygon polygon)
polygon
- the Polygon for which the area is calculated.
protected double getPerimeter(com.vividsolutions.jts.geom.Polygon polygon)
polygon
- the Polygon for which the perimeter is calculated.
protected double getPerimeter(com.vividsolutions.jts.geom.MultiLineString multiLineString)
multiLineString
- the MultiLineString for which the perimeter is
calculated.
protected double getPerimeter(com.vividsolutions.jts.geom.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 |