Package javax.jdo.query.geospatial
Interface GeometryExpression<T>
-
- All Superinterfaces:
ComparableExpression<T>
,Expression<T>
- All Known Subinterfaces:
GeometryCollectionExpression<T>
,LinearRingExpression<T>
,LineStringExpression<T>
,MultiLineStringExpression<T>
,MultiPointExpression<T>
,MultiPolygonExpression<T>
,PointExpression<T>
,PolygonExpression<T>
public interface GeometryExpression<T> extends ComparableExpression<T>
Representation of a geometry expression. Note that this is not part of the JDO spec, but a vendor extension to allow JDOQLTyped handling for geometry types.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description GeometryExpression
buffer(NumericExpression dist)
Returns as Geometry defined by buffering a distance around the Geometry.BooleanExpression
contains(GeometryExpression geom)
TRUE if the second Geometry is completely contained in first GeometryGeometryExpression
convexHull()
Returns a Geometry that is the convex hull of the Geometry.BooleanExpression
crosses(GeometryExpression geom)
TRUE if this geometry crosses the other Geometry.GeometryExpression
difference(GeometryExpression geom)
Returns a Geometry that is the closure of the set difference of the two geometries.BooleanExpression
disjoint(GeometryExpression geom)
TRUE if the two geometries are spatially disjoint.NumericExpression
distance(GeometryExpression geom)
Returns the distance to the other geometry.BooleanExpression
equals(GeometryExpression geom)
TRUE if the two geometries are spatially equal.NumericExpression
getArea()
Returns the area of Surface/MultiSurface.GeometryExpression
getBoundary()
Returns a Geometry that is the combinatorial boundary of the Geometry.GeometryExpression
getCentroid()
Returns the centroid of Surface/MultiSurface, which may lie outside of it.NumericExpression
getDimension()
Returns the dimension of the Geometry.GeometryExpression
getEnvelope()
Returns the rectangle bounding Geometry as a Polygon.GeometryExpression
getGeometryN(NumericExpression position)
Returns the nth geometry in the collection.StringExpression
getGeometryType()
Returns the name of the instantiable subtype of Geometry.NumericExpression
getLength()
Returns the length of the Curve/MultiCurve.NumericExpression
getNumGeometries()
Returns the number of geometries in the collection.NumericExpression
getNumPoints()
Returns the number of points in the LineString.GeometryExpression
getPointOnSurface()
Returns a Point guaranteed to lie on the surface.NumericExpression
getSRID()
Returns the Spatial Reference System ID for this Geometry.GeometryExpression
intersection(GeometryExpression geom)
Returns a Geometry that is the set intersection of the two geometries.BooleanExpression
intersects(GeometryExpression geom)
TRUE if this Geometry spatially intersects the other Geometry.BooleanExpression
isEmpty()
Returns whether this Geometry corresponds to the empty set.BooleanExpression
isSimple()
Whether this Geometry is simple, as defined in the Geometry Model.BooleanExpression
overlaps(GeometryExpression geom)
TRUE if this geometry is spatially overlapping the other Geometry.BooleanExpression
relate(GeometryExpression geom, StringExpression pattern)
TRUE if the spatial relationship specified by the pattern matrix holdsGeometryExpression
symDifference(GeometryExpression geom)
Returns a Geometry that is the closure of the set symmetric difference of the two geometries.ObjectExpression
toBinary()
Returns the well-known binary representation.StringExpression
toText()
Returns the well-known textual representation.BooleanExpression
touches(GeometryExpression geom)
TRUE if this geometry spatially touches the other Geometry.GeometryExpression
union(GeometryExpression geom)
Returns a Geometry that is the set union of the two geometries.BooleanExpression
within(GeometryExpression geom)
TRUE if this geometry is completely contained in second Geometry.-
Methods inherited from interface javax.jdo.query.ComparableExpression
asc, desc, gt, gt, gteq, gteq, lt, lt, lteq, lteq, max, min
-
Methods inherited from interface javax.jdo.query.Expression
as, cast, count, countDistinct, eq, eq, instanceOf, ne, ne
-
-
-
-
Method Detail
-
getEnvelope
GeometryExpression getEnvelope()
Returns the rectangle bounding Geometry as a Polygon.- Returns:
- The bounding envelope
-
getDimension
NumericExpression getDimension()
Returns the dimension of the Geometry.- Returns:
- The dimension
-
getBoundary
GeometryExpression getBoundary()
Returns a Geometry that is the combinatorial boundary of the Geometry.- Returns:
- The boundary geometry
-
getSRID
NumericExpression getSRID()
Returns the Spatial Reference System ID for this Geometry.- Returns:
- The SRID
-
isSimple
BooleanExpression isSimple()
Whether this Geometry is simple, as defined in the Geometry Model.- Returns:
- Whether it is simple
-
isEmpty
BooleanExpression isEmpty()
Returns whether this Geometry corresponds to the empty set.- Returns:
- Whether it is empty
-
toText
StringExpression toText()
Returns the well-known textual representation.- Returns:
- The geometry as text
-
toBinary
ObjectExpression toBinary()
Returns the well-known binary representation.- Returns:
- The geometry as binary
-
getGeometryType
StringExpression getGeometryType()
Returns the name of the instantiable subtype of Geometry.- Returns:
- The type
-
contains
BooleanExpression contains(GeometryExpression geom)
TRUE if the second Geometry is completely contained in first Geometry- Parameters:
geom
- The other geometry- Returns:
- Whether this contains the other geometry
-
overlaps
BooleanExpression overlaps(GeometryExpression geom)
TRUE if this geometry is spatially overlapping the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they overlap
-
touches
BooleanExpression touches(GeometryExpression geom)
TRUE if this geometry spatially touches the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they touch
-
crosses
BooleanExpression crosses(GeometryExpression geom)
TRUE if this geometry crosses the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they cross
-
within
BooleanExpression within(GeometryExpression geom)
TRUE if this geometry is completely contained in second Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether it is contained
-
intersects
BooleanExpression intersects(GeometryExpression geom)
TRUE if this Geometry spatially intersects the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they intersect
-
equals
BooleanExpression equals(GeometryExpression geom)
TRUE if the two geometries are spatially equal.- Parameters:
geom
- The other geometry- Returns:
- Whether they are equals
-
disjoint
BooleanExpression disjoint(GeometryExpression geom)
TRUE if the two geometries are spatially disjoint.- Parameters:
geom
- The other geometry- Returns:
- Whether they are disjoint
-
relate
BooleanExpression relate(GeometryExpression geom, StringExpression pattern)
TRUE if the spatial relationship specified by the pattern matrix holds- Parameters:
geom
- The geometry to relate topattern
- The pattern matrix- Returns:
- Whether they relate
-
distance
NumericExpression distance(GeometryExpression geom)
Returns the distance to the other geometry.- Parameters:
geom
- The other geometry- Returns:
- The distance
-
intersection
GeometryExpression intersection(GeometryExpression geom)
Returns a Geometry that is the set intersection of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- the intersection
-
buffer
GeometryExpression buffer(NumericExpression dist)
Returns as Geometry defined by buffering a distance around the Geometry.- Parameters:
dist
- distance of the buffer- Returns:
- the buffered geometry
-
convexHull
GeometryExpression convexHull()
Returns a Geometry that is the convex hull of the Geometry.- Returns:
- The convex hull geometry
-
symDifference
GeometryExpression symDifference(GeometryExpression geom)
Returns a Geometry that is the closure of the set symmetric difference of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- The sym difference
-
difference
GeometryExpression difference(GeometryExpression geom)
Returns a Geometry that is the closure of the set difference of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- The difference
-
union
GeometryExpression union(GeometryExpression geom)
Returns a Geometry that is the set union of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- The union of the two geometries
-
getLength
NumericExpression getLength()
Returns the length of the Curve/MultiCurve.- Returns:
- The length
-
getNumPoints
NumericExpression getNumPoints()
Returns the number of points in the LineString.- Returns:
- The number of points
-
getCentroid
GeometryExpression getCentroid()
Returns the centroid of Surface/MultiSurface, which may lie outside of it.- Returns:
- The centroid
-
getArea
NumericExpression getArea()
Returns the area of Surface/MultiSurface.- Returns:
- The area
-
getPointOnSurface
GeometryExpression getPointOnSurface()
Returns a Point guaranteed to lie on the surface.- Returns:
- The point
-
getNumGeometries
NumericExpression getNumGeometries()
Returns the number of geometries in the collection.- Returns:
- Number of geometries
-
getGeometryN
GeometryExpression getGeometryN(NumericExpression position)
Returns the nth geometry in the collection.- Parameters:
position
- The "n"- Returns:
- The nth geometry of the collection
-
-