Class PreparedGeometryIndex
java.lang.Object
org.locationtech.jtsexample.technique.PreparedGeometryIndex
A spatial index which indexes
PreparedGeometry
s
created from a set of Geometry
s.
This can be used for efficient testing
for intersection with a series of target geomtries.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
insert
(Collection geoms) Inserts a collection of Geometrys into the index.Finds allPreparedGeometry
s which intersect a givenGeometry
Finds allPreparedGeometry
s which might interact with a queryGeometry
.
-
Field Details
-
index
-
-
Constructor Details
-
PreparedGeometryIndex
public PreparedGeometryIndex()Creates a new index
-
-
Method Details
-
insert
Inserts a collection of Geometrys into the index.- Parameters:
geoms
- a collection of Geometrys to insert
-
query
Finds allPreparedGeometry
s which might interact with a queryGeometry
.- Parameters:
g
- the geometry to query by- Returns:
- a list of candidate PreparedGeometrys
-
intersects
Finds allPreparedGeometry
s which intersect a givenGeometry
- Parameters:
g
- the geometry to query by- Returns:
- a list of intersecting PreparedGeometrys
-