Class PreparedGeometryIndex

java.lang.Object
org.locationtech.jtsexample.technique.PreparedGeometryIndex

class PreparedGeometryIndex extends Object
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 Details

  • Constructor Details

    • PreparedGeometryIndex

      public PreparedGeometryIndex()
      Creates a new index
  • Method Details

    • insert

      public void insert(Collection geoms)
      Inserts a collection of Geometrys into the index.
      Parameters:
      geoms - a collection of Geometrys to insert
    • query

      public List query(Geometry g)
      Finds all PreparedGeometrys which might interact with a query Geometry.
      Parameters:
      g - the geometry to query by
      Returns:
      a list of candidate PreparedGeometrys
    • intersects

      public List intersects(Geometry g)
      Finds all PreparedGeometrys which intersect a given Geometry
      Parameters:
      g - the geometry to query by
      Returns:
      a list of intersecting PreparedGeometrys