Class PlanitJtsIntersectZoneVisitor<T extends Zone>

  • All Implemented Interfaces:
    org.locationtech.jts.index.ItemVisitor

    public class PlanitJtsIntersectZoneVisitor<T extends Zone>
    extends PlanitJtsItemVisitor<T>
    An item visitor for quadtree spatial index to filter out the zones in a quadtree that truly intersect with the given bounding box provided in the query. Since spatial granularity of the "squares" in the quadtree might be too coarse it may select a too large a set of matches for any given bounding box. By providing this visitor we explicitly check the provided subset if it indeed intersects with the given filer, i.e., bounding box that we are searching for.
    Author:
    markr
    • Constructor Detail

      • PlanitJtsIntersectZoneVisitor

        public PlanitJtsIntersectZoneVisitor​(org.locationtech.jts.geom.Polygon geometryFilter,
                                             Collection<T> filteredResultToPopulate)
        Constructor
        Parameters:
        geometryFilter - to use
        filteredResultToPopulate - to populate
    • Method Detail

      • getGeometry

        protected org.locationtech.jts.geom.Geometry getGeometry​(T zone)
        The implementing class is expected to provide the envelope for the entity
        Specified by:
        getGeometry in class PlanitJtsItemVisitor<T extends Zone>
        Parameters:
        zone - to extract envelope for
        Returns:
        envelope of the entity to match the filter