Class PlanitJtsIntersectOsmNodeVisitor

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

    public class PlanitJtsIntersectOsmNodeVisitor
    extends Object
    implements org.locationtech.jts.index.ItemVisitor
    An item visitor for quadtree spatial index to filter out osm nodes 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

      • PlanitJtsIntersectOsmNodeVisitor

        public PlanitJtsIntersectOsmNodeVisitor​(org.locationtech.jts.geom.Polygon geometryFilter,
                                                Collection<de.topobyte.osm4j.core.model.iface.OsmNode> filteredResultToPopulate)
        Constructor
        Parameters:
        geometryFilter - to use
        filteredResultToPopulate - to populate
    • Method Detail

      • visitItem

        public void visitItem​(Object osmNode)
        Specified by:
        visitItem in interface org.locationtech.jts.index.ItemVisitor
      • getResult

        public Collection<de.topobyte.osm4j.core.model.iface.OsmNode> getResult()
        Collect the filtered result created by the visitor
        Returns:
        result