Class PreparedGeometryIndex
java.lang.Object
org.locationtech.jtsexample.technique.PreparedGeometryIndex
A spatial index which indexes
PreparedGeometrys
created from a set of Geometrys.
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 TypeMethodDescriptionvoidinsert(Collection geoms) Inserts a collection of Geometrys into the index.Finds allPreparedGeometrys which intersect a givenGeometryFinds allPreparedGeometrys 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 allPreparedGeometrys which might interact with a queryGeometry.- Parameters:
g- the geometry to query by- Returns:
- a list of candidate PreparedGeometrys
-
intersects
Finds allPreparedGeometrys which intersect a givenGeometry- Parameters:
g- the geometry to query by- Returns:
- a list of intersecting PreparedGeometrys
-