Package org.locationtech.jts.geom.prep
Class PreparedPolygon
java.lang.Object
org.locationtech.jts.geom.prep.PreparedPolygon
- All Implemented Interfaces:
PreparedGeometry
A prepared version for
Polygonal
geometries.
This class supports both Polygon
s and MultiPolygon
s.
This class does not support MultiPolygons which are non-valid (e.g. with overlapping elements).
Instances of this class are thread-safe and immutable.
- Author:
- mbdavis
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
Default implementation.boolean
Default implementation.boolean
Default implementation.boolean
Default implementation.boolean
Default implementation.boolean
Standard implementation for all geometries.Gets the originalGeometry
which has been prepared.Gets the indexed intersection finder for this geometry.Gets the list of representative points for this geometry.boolean
Default implementation.boolean
isAnyTargetComponentInTest
(Geometry testGeom) Tests whether any representative of the target geometry intersects the test geometry.boolean
Default implementation.toString()
boolean
Default implementation.boolean
Default implementation.
-
Constructor Details
-
PreparedPolygon
-
-
Method Details
-
getIntersectionFinder
Gets the indexed intersection finder for this geometry.- Returns:
- the intersection finder
-
getPointLocator
-
intersects
Default implementation.- Specified by:
intersects
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry intersects the given Geometry
- See Also:
-
contains
Default implementation.- Specified by:
contains
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry contains the given Geometry
- See Also:
-
containsProperly
Default implementation.- Specified by:
containsProperly
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry properly contains the given Geometry
- See Also:
-
covers
Default implementation.- Specified by:
covers
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry covers the given Geometry
- See Also:
-
getGeometry
Description copied from interface:PreparedGeometry
Gets the originalGeometry
which has been prepared.- Specified by:
getGeometry
in interfacePreparedGeometry
- Returns:
- the base geometry
-
getRepresentativePoints
Gets the list of representative points for this geometry. One vertex is included for every component of the geometry (i.e. including one for every ring of polygonal geometries). Do not modify the returned list!- Returns:
- a List of Coordinate
-
isAnyTargetComponentInTest
Tests whether any representative of the target geometry intersects the test geometry. This is useful in A/A, A/L, A/P, L/P, and P/P cases.- Parameters:
testGeom
- the test geometry- Returns:
- true if any component intersects the areal test geometry
-
coveredBy
Default implementation.- Specified by:
coveredBy
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry is covered by the given Geometry
- See Also:
-
crosses
Default implementation.- Specified by:
crosses
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry crosses the given Geometry
- See Also:
-
disjoint
Standard implementation for all geometries. SupportsGeometryCollection
s as input.- Specified by:
disjoint
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry is disjoint from the given Geometry
- See Also:
-
overlaps
Default implementation.- Specified by:
overlaps
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry overlaps the given Geometry
- See Also:
-
touches
Default implementation.- Specified by:
touches
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry touches the given Geometry
- See Also:
-
within
Default implementation.- Specified by:
within
in interfacePreparedGeometry
- Parameters:
g
- the Geometry to test- Returns:
- true if this Geometry is within the given Geometry
- See Also:
-
toString
-