Package org.goplanit.utils.geo
Class PlanitJtsIntersectEdgeVisitor<T extends Edge>
- java.lang.Object
-
- org.goplanit.utils.geo.PlanitJtsItemVisitor<T>
-
- org.goplanit.utils.geo.PlanitJtsIntersectEdgeVisitor<T>
-
- 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 Summary
Constructors Constructor Description PlanitJtsIntersectEdgeVisitor(org.locationtech.jts.geom.Polygon geometryFilter, Collection<T> filteredResultToPopulate)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.locationtech.jts.geom.Geometry
getGeometry(T edge)
The implementing class is expected to provide the envelope for the entity-
Methods inherited from class org.goplanit.utils.geo.PlanitJtsItemVisitor
getResult, visitItem
-
-
-
-
Constructor Detail
-
PlanitJtsIntersectEdgeVisitor
public PlanitJtsIntersectEdgeVisitor(org.locationtech.jts.geom.Polygon geometryFilter, Collection<T> filteredResultToPopulate)
Constructor- Parameters:
geometryFilter
- to usefilteredResultToPopulate
- 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 classPlanitJtsItemVisitor<T extends Edge>
- Parameters:
edge
- to extract envelope for- Returns:
- envelope of the entity to match the filter
-
-