class PreparedGeometry extends java.lang.Object
A PreparedGeometry makes repeated spatial operations more efficient.
You can create a PreparedGeometry by wrapping an existing Geometry:
def p1 = new PreparedGeometry(new Point(1,4))
Or by calling the prepare() method on a Geometry:
def prep = Geometry.fromWKT('POLYGON ((0 0, 5 0, 5 5, 0 5, 0 0))').prepare()
Or by using the Geometry.prepare() static method:
def prep = Geometry.prepared(Geometry.fromWKT('POLYGON ((0 0, 5 0, 5 5, 0 5, 0 0))'))
Type | Name and description |
---|---|
static PreparedGeometryFactory |
factory The JTS PreparedGeometryFactory |
PreparedGeometry |
prepGeom The wrapped JTS PreparedGeometry |
Constructor and description |
---|
PreparedGeometry
(Geometry geom) Create a PreparedGeometry from a Geometry |
Type Params | Return Type | Name and description |
---|---|---|
|
boolean |
contains(Geometry geom) Whether this PreparedGeometry contains the given Geometry |
|
boolean |
containsProperly(Geometry geom) Whether this PreparedGeometry contains the given Geometry. |
|
boolean |
coveredBy(Geometry geom) Whether this PreparedGeometry is covered by the given Geometry. |
|
boolean |
covers(Geometry geom) Whether this PreparedGeometry covers the given Geometry. |
|
boolean |
crosses(Geometry geom) Whether this PreparedGeometry crosses the given Geometry. |
|
boolean |
disjoint(Geometry geom) Whether this PreparedGeometry is disjoint the given Geometry. |
|
Geometry |
getGeometry() Get the base Geometry of this PreparedGeometry |
|
boolean |
intersects(Geometry geom) Whether this PreparedGeometry intersects the given Geometry. |
|
boolean |
overlaps(Geometry geom) Whether this PreparedGeometry overlaps the given Geometry. |
|
java.lang.String |
toString() The String representation |
|
boolean |
touches(Geometry geom) Whether this PreparedGeometry touches the given Geometry. |
|
boolean |
within(Geometry geom) Whether this PreparedGeometry is within the given Geometry. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long), java.lang.Object#wait(long, int), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
The JTS PreparedGeometryFactory
The wrapped JTS PreparedGeometry
Create a PreparedGeometry from a Geometry
A
- GeometryWhether this PreparedGeometry contains the given Geometry
The
- other GeometryWhether this PreparedGeometry contains the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry is covered by the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry covers the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry crosses the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry is disjoint the given Geometry.
geom
- The other GeometryGet the base Geometry of this PreparedGeometry
Whether this PreparedGeometry intersects the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry overlaps the given Geometry.
geom
- The other GeometryThe String representation
Whether this PreparedGeometry touches the given Geometry.
geom
- The other GeometryWhether this PreparedGeometry is within the given Geometry.
geom
- The other GeometryGroovy Documentation