Class ZoneLayer<T>


  • public final class ZoneLayer<T>
    extends Object
    Representation of a spatial index containing zones backed by a quadtree.
    Author:
    illenberger
    • Constructor Detail

      • ZoneLayer

        public ZoneLayer​(Set<Zone<T>> zones)
        Creates a new zone layer containing the zones in zones.
        Parameters:
        zones - a set of zones.
    • Method Detail

      • overwriteCRS

        public void overwriteCRS​(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
        Allows to manually overwrite the coordinate reference system (e.g. if the ZoneLayer is read from a shape file without crs information).
        Parameters:
        crs - a coordinate reference system.
      • getZone

        public Zone<TgetZone​(org.locationtech.jts.geom.Point point)
        Returns the zone containing point. If multiple zones contain point one random zone is returned.
        Parameters:
        point - a point geometry
        Returns:
        the zone containing point, or null if no zone contains point.
      • getZones

        public Set<Zone<T>> getZones()
        Returns a set of all zones.
        Returns:
        a set of all zones.