Package org.goplanit.osm.util
Class PlanitJtsIntersectOsmNodeVisitor
- java.lang.Object
-
- org.goplanit.osm.util.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 Summary
Constructors Constructor Description PlanitJtsIntersectOsmNodeVisitor(org.locationtech.jts.geom.Polygon geometryFilter, Collection<de.topobyte.osm4j.core.model.iface.OsmNode> filteredResultToPopulate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Collection<de.topobyte.osm4j.core.model.iface.OsmNode>
getResult()
Collect the filtered result created by the visitorvoid
visitItem(Object osmNode)
-
-
-
Constructor Detail
-
PlanitJtsIntersectOsmNodeVisitor
public PlanitJtsIntersectOsmNodeVisitor(org.locationtech.jts.geom.Polygon geometryFilter, Collection<de.topobyte.osm4j.core.model.iface.OsmNode> filteredResultToPopulate)
Constructor- Parameters:
geometryFilter
- to usefilteredResultToPopulate
- to populate
-
-
Method Detail
-
visitItem
public void visitItem(Object osmNode)
- Specified by:
visitItem
in interfaceorg.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
-
-