When querying spatial data you can make use of a set of spatial methods on the various Java geometry
types. The list contains all of the functions detailed in Section 3.2 of the
OGC Simple Features specification.
Additionally DataNucleus provides some commonly required methods like bounding box test and datastore
specific functions. The following tables list all available functions as well as information about
which RDBMS implement them. An entry in the "Result" column indicates, whether the funcion may be
used in the result part of a JDOQL query.

TRUE if the spatial relationship specified by the patternMatrix holds.

OGC SF

[3]

[1] Oracle does not allow boolean expressions in the SELECT-list.
[2] MySQL does not implement these functions according to the specification.They return the same result
as the corresponding MBR-based functions.
[3] MySQL does not implement these functions.

Function on Distance Relationships
(OGC SF 3.2.20)

Method

Description

Specification

Result

PostGIS

MySQL

Oracle Spatial

Spatial.distance(Geometry, Geometry)

Returns the distance between the two geometries.

OGC SF

[1]

[1] MySQL does not implement this function.

Functions that implement Spatial Operators
(OGC SF 3.2.21)

Method

Description

Specification

Result

PostGIS

MySQL [1]

Oracle Spatial

Spatial.intersection(Geometry, Geometry)

Returns a Geometry that is the set intersection of the two geometries.

OGC SF

Spatial.difference(Geometry, Geometry)

Returns a Geometry that is the closure of the set difference of the two geometries.

OGC SF

Spatial,union(Geometry, Geometry)

Returns a Geometry that is the set union of the two geometries.

OGC SF

Spatial.symDifference(Geometry, Geometry)

Returns a Geometry that is the closure of the set symmetric difference of the two geometries.

OGC SF

Spatial.buffer(Geometry, Double)

Returns as Geometry defined by buffering a distance around the Geometry.

OGC SF

Spatial.convexHull(Geometry)

Returns a Geometry that is the convex hull of the Geometry.

OGC SF

[1] These functions are currently not implemented in MySQL.They may appear in future releases.

Test whether the bounding box of one geometry intersects the bounding box of another

Method

Description

Result

PostGIS

MySQL

Oracle Spatial

Spatial.bboxTest(Geometry, Geometry)

Returns TRUE if if the bounding box of the first Geometry overlaps second Geometry's bounding box

[1]

[1] Oracle does not allow boolean expressions in the SELECT-list.

PostGIS Spatial Operators

These functions are only supported on PostGIS.

Method

Description

Result

PostGIS.bboxOverlapsLeft(Geometry, Geometry)

The PostGIS
&<
operator returns TRUE if the bounding box of the first Geometry overlaps or is to the left of second Geometry's bounding box

PostGIS.bboxOverlapsRight(Geometry, Geometry)

The PostGIS
&>
operator returns TRUE if the bounding box of the first Geometry overlaps or is to the right of second Geometry's bounding box

PostGIS.bboxLeft(Geometry, Geometry)

The PostGIS
<<
operator returns TRUE if the bounding box of the first Geometry overlaps or is strictly to the left of second Geometry's bounding box

PostGIS.bboxRight(Geometry, Geometry)

The PostGIS
>>
operator returns TRUE if the bounding box of the first Geometry overlaps or is strictly to the right of second Geometry's bounding box

PostGIS.bboxOverlapsBelow(Geometry, Geometry)

The PostGIS
&<@
operator returns TRUE if the bounding box of the first Geometry overlaps or is below second Geometry's bounding box

PostGIS.bboxOverlapsAbove(Geometry, Geometry)

The PostGIS
|&>
operator returns TRUE if the bounding box of the first Geometry overlaps or is above second Geometry's bounding box

PostGIS.bboxBelow(Geometry, Geometry)

The PostGIS
<<|
operator returns TRUE if the bounding box of the first Geometry is strictly below second Geometry's bounding box

PostGIS.bboxAbove(Geometry, Geometry)

The PostGIS
|>>
operator returns TRUE if the bounding box of the first Geometry is strictly above second Geometry's bounding box

PostGIS.sameAs(Geometry, Geometry)

The PostGIS
~=
operator returns TRUE if the two geometries are vertex-by-vertex equal.

PostGIS.bboxWithin(Geometry, Geometry)

The PostGIS
@
operator returns TRUE if the bounding box of the first Geometry overlaps or is completely contained by second Geometry's bounding box

PostGIS.bboxContains(Geometry, Geometry)

The PostGIS
~
operator returns TRUE if the bounding box of the first Geometry completely contains second Geometry's bounding box