Class PlanitJtsIntersectEdgeVisitor<T extends Edge>

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

    public class PlanitJtsIntersectEdgeVisitor<T extends Edge>
    extends PlanitJtsItemVisitor<T>
    An item visitor for quadtree spatial index to filter out the edges 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

      • PlanitJtsIntersectEdgeVisitor

        public PlanitJtsIntersectEdgeVisitor​(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 edge)
        The implementing class is expected to provide the envelope for the entity
        Specified by:
        getGeometry in class PlanitJtsItemVisitor<T extends Edge>
        Parameters:
        edge - to extract envelope for
        Returns:
        envelope of the entity to match the filter