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>
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
Modifier and TypeMethodDescriptionbuffer
(NumericExpression dist) Returns as Geometry defined by buffering a distance around the Geometry.contains
(GeometryExpression geom) TRUE if the second Geometry is completely contained in first GeometryReturns a Geometry that is the convex hull of the Geometry.crosses
(GeometryExpression geom) TRUE if this geometry crosses the other Geometry.difference
(GeometryExpression geom) Returns a Geometry that is the closure of the set difference of the two geometries.disjoint
(GeometryExpression geom) TRUE if the two geometries are spatially disjoint.distance
(GeometryExpression geom) Returns the distance to the other geometry.equals
(GeometryExpression geom) TRUE if the two geometries are spatially equal.getArea()
Returns the area of Surface/MultiSurface.Returns a Geometry that is the combinatorial boundary of the Geometry.Returns the centroid of Surface/MultiSurface, which may lie outside of it.Returns the dimension of the Geometry.Returns the rectangle bounding Geometry as a Polygon.getGeometryN
(NumericExpression position) Returns the nth geometry in the collection.Returns the name of the instantiable subtype of Geometry.Returns the length of the Curve/MultiCurve.Returns the number of geometries in the collection.Returns the number of points in the LineString.Returns a Point guaranteed to lie on the surface.getSRID()
Returns the Spatial Reference System ID for this Geometry.Returns a Geometry that is the set intersection of the two geometries.intersects
(GeometryExpression geom) TRUE if this Geometry spatially intersects the other Geometry.isEmpty()
Returns whether this Geometry corresponds to the empty set.isSimple()
Whether this Geometry is simple, as defined in the Geometry Model.overlaps
(GeometryExpression geom) TRUE if this geometry is spatially overlapping the other Geometry.relate
(GeometryExpression geom, StringExpression pattern) TRUE if the spatial relationship specified by the pattern matrix holdsReturns a Geometry that is the closure of the set symmetric difference of the two geometries.toBinary()
Returns the well-known binary representation.toText()
Returns the well-known textual representation.touches
(GeometryExpression geom) TRUE if this geometry spatially touches the other Geometry.union
(GeometryExpression geom) Returns a Geometry that is the set union of the two geometries.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 Details
-
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
TRUE if the second Geometry is completely contained in first Geometry- Parameters:
geom
- The other geometry- Returns:
- Whether this contains the other geometry
-
overlaps
TRUE if this geometry is spatially overlapping the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they overlap
-
touches
TRUE if this geometry spatially touches the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they touch
-
crosses
TRUE if this geometry crosses the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they cross
-
within
TRUE if this geometry is completely contained in second Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether it is contained
-
intersects
TRUE if this Geometry spatially intersects the other Geometry.- Parameters:
geom
- The other geometry- Returns:
- Whether they intersect
-
equals
TRUE if the two geometries are spatially equal.- Parameters:
geom
- The other geometry- Returns:
- Whether they are equals
-
disjoint
TRUE if the two geometries are spatially disjoint.- Parameters:
geom
- The other geometry- Returns:
- Whether they are disjoint
-
relate
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
Returns the distance to the other geometry.- Parameters:
geom
- The other geometry- Returns:
- The distance
-
intersection
Returns a Geometry that is the set intersection of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- the intersection
-
buffer
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
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
Returns a Geometry that is the closure of the set difference of the two geometries.- Parameters:
geom
- The other geometry- Returns:
- The difference
-
union
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
Returns the nth geometry in the collection.- Parameters:
position
- The "n"- Returns:
- The nth geometry of the collection
-