Class PreparedGeometryIndex


  • class PreparedGeometryIndex
    extends java.lang.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.
    • Constructor Detail

      • PreparedGeometryIndex

        public PreparedGeometryIndex()
        Creates a new index
    • Method Detail

      • insert

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

        public java.util.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 java.util.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