Class GeometryTesselationMap<T>

  • Type Parameters:
    T - the type of values to be associated to geometries.


    public class GeometryTesselationMap<T>
    extends Object
    A more useful extension of GeometryTesselation that allows a value to be mapped to each added geometry.
    • Constructor Detail

      • GeometryTesselationMap

        public GeometryTesselationMap()
      • GeometryTesselationMap

        public GeometryTesselationMap(boolean usePreparedGeometries)
    • Method Detail

      • add

        public void add(Geometry geom,
                        T thing)
        Add geom to the tesselation and map thing to this geometry. Thus a test for a point covered by geom will return a set containing thing.
        Parameters:
        geom - the geometry to register thing for.
        thing - the value associated to geom.
      • test

        public Set<T> test(Point point)
        Return the set of values, whose associated geometries cover the given point.
        Parameters:
        point - the point to test for.
        Returns:
        all values that cover the point.
      • testForIntersections

        public Set<T> testForIntersections(Geometry geometry)
        Return the set of values, whose associated geometries intersect the given geometry.
        Parameters:
        geometry - the geometry to test for.
        Returns:
        all values that intersect the geometry.
      • values

        public Collection<T> values()
        Returns:
        a collection of all elements that have been added to this tesselation.