class BasicPreparedGeometry extends java.lang.Object implements PreparedGeometry
PreparedGeometry
subclasses.
Contains default implementations for methods, which simply delegate
to the equivalent Geometry
methods.
This class may be used as a "no-op" class for Geometry types
which do not have a corresponding PreparedGeometry
implementation.Modifier and Type | Field and Description |
---|---|
private Geometry |
baseGeom |
private java.util.List |
representativePts |
Constructor and Description |
---|
BasicPreparedGeometry(Geometry geom) |
Modifier and Type | Method and Description |
---|---|
boolean |
contains(Geometry g)
Default implementation.
|
boolean |
containsProperly(Geometry g)
Default implementation.
|
boolean |
coveredBy(Geometry g)
Default implementation.
|
boolean |
covers(Geometry g)
Default implementation.
|
boolean |
crosses(Geometry g)
Default implementation.
|
boolean |
disjoint(Geometry g)
Standard implementation for all geometries.
|
protected boolean |
envelopeCovers(Geometry g)
Determines whether the envelope of
this geometry covers the Geometry g.
|
protected boolean |
envelopesIntersect(Geometry g)
Determines whether a Geometry g interacts with
this geometry by testing the geometry envelopes.
|
Geometry |
getGeometry()
Gets the original
Geometry which has been prepared. |
java.util.List |
getRepresentativePoints()
Gets the list of representative points for this geometry.
|
boolean |
intersects(Geometry g)
Default implementation.
|
boolean |
isAnyTargetComponentInTest(Geometry testGeom)
Tests whether any representative of the target geometry
intersects the test geometry.
|
boolean |
overlaps(Geometry g)
Default implementation.
|
java.lang.String |
toString() |
boolean |
touches(Geometry g)
Default implementation.
|
boolean |
within(Geometry g)
Default implementation.
|
private final Geometry baseGeom
private final java.util.List representativePts
public BasicPreparedGeometry(Geometry geom)
public Geometry getGeometry()
PreparedGeometry
Geometry
which has been prepared.getGeometry
in interface PreparedGeometry
public java.util.List getRepresentativePoints()
public boolean isAnyTargetComponentInTest(Geometry testGeom)
testGeom
- the test geometryprotected boolean envelopesIntersect(Geometry g)
g
- a Geometryprotected boolean envelopeCovers(Geometry g)
g
- a Geometrypublic boolean contains(Geometry g)
contains
in interface PreparedGeometry
g
- the Geometry to testGeometry.contains(Geometry)
public boolean containsProperly(Geometry g)
containsProperly
in interface PreparedGeometry
g
- the Geometry to testGeometry.contains(org.locationtech.jts.geom.Geometry)
public boolean coveredBy(Geometry g)
coveredBy
in interface PreparedGeometry
g
- the Geometry to testGeometry.coveredBy(Geometry)
public boolean covers(Geometry g)
covers
in interface PreparedGeometry
g
- the Geometry to testGeometry.covers(Geometry)
public boolean crosses(Geometry g)
crosses
in interface PreparedGeometry
g
- the Geometry to testGeometry.crosses(Geometry)
public boolean disjoint(Geometry g)
GeometryCollection
s as input.disjoint
in interface PreparedGeometry
g
- the Geometry to testGeometry.disjoint(Geometry)
public boolean intersects(Geometry g)
intersects
in interface PreparedGeometry
g
- the Geometry to testGeometry.intersects(Geometry)
public boolean overlaps(Geometry g)
overlaps
in interface PreparedGeometry
g
- the Geometry to testGeometry.overlaps(Geometry)
public boolean touches(Geometry g)
touches
in interface PreparedGeometry
g
- the Geometry to testGeometry.touches(Geometry)
public boolean within(Geometry g)
within
in interface PreparedGeometry
g
- the Geometry to testGeometry.within(Geometry)
public java.lang.String toString()
toString
in class java.lang.Object