Package org.goplanit.utils.geo
Class GeoContainerUtils
- java.lang.Object
-
- org.goplanit.utils.geo.GeoContainerUtils
-
public class GeoContainerUtils extends Object
Uitlity class to convert various PLANit entities into spatially indexed quad tree containers
-
-
Constructor Summary
Constructors Constructor Description GeoContainerUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Edge>
Collection<T>queryEdgeQuadtree(org.locationtech.jts.index.quadtree.Quadtree spatiallyIndexedEdgeTree, org.locationtech.jts.geom.Envelope searchBoundingBox)
Find edges spatially based on the provided bounding box and spatially indexed quadtree containing edges as valuesstatic <T extends Zone>
Collection<T>queryZoneQuadtree(org.locationtech.jts.index.quadtree.Quadtree spatialContainer, org.locationtech.jts.geom.Envelope boundingBox)
Query a quad tree populated with zone locations and return all zones within or touching the given bounding boxstatic <T extends Edge>
org.locationtech.jts.index.quadtree.QuadtreetoGeoIndexed(Collection<? extends GraphEntities<T>> edgesCollection)
Created quadtree based on edge envelopes as spatial index.static <T extends Zone>
org.locationtech.jts.index.quadtree.QuadtreetoGeoIndexed(Zones<T> zones)
Created quadtree based on transfer zone envelopes as spatial index.static <T extends GraphEntities<? extends Edge>>
org.locationtech.jts.index.quadtree.QuadtreetoGeoIndexed(T edges)
Created quadtree based on edge envelopes as spatial index.
-
-
-
Method Detail
-
toGeoIndexed
public static <T extends Zone> org.locationtech.jts.index.quadtree.Quadtree toGeoIndexed(Zones<T> zones)
Created quadtree based on transfer zone envelopes as spatial index. Requires PlanitJtsIntersectZoneVisitor to filter out true spatial matches when querying.- Type Parameters:
T
- type of zone- Parameters:
zones
- to spatially index- Returns:
- created quadtree instance
-
toGeoIndexed
public static <T extends Edge> org.locationtech.jts.index.quadtree.Quadtree toGeoIndexed(Collection<? extends GraphEntities<T>> edgesCollection)
Created quadtree based on edge envelopes as spatial index. Requires PlanitJtsIntersectEdgeVisitor to filter out true spatial matches when querying.- Type Parameters:
T
- type of edge- Parameters:
edgesCollection
- collections to add- Returns:
- created quadtree instance
-
toGeoIndexed
public static <T extends GraphEntities<? extends Edge>> org.locationtech.jts.index.quadtree.Quadtree toGeoIndexed(T edges)
Created quadtree based on edge envelopes as spatial index. Requires PlanitJtsIntersectEdgeVisitor to filter out true spatial matches when querying.- Type Parameters:
T
- type of edge- Parameters:
edges
- collections to add- Returns:
- created quadtree instance
-
queryZoneQuadtree
public static <T extends Zone> Collection<T> queryZoneQuadtree(org.locationtech.jts.index.quadtree.Quadtree spatialContainer, org.locationtech.jts.geom.Envelope boundingBox)
Query a quad tree populated with zone locations and return all zones within or touching the given bounding box- Type Parameters:
T
- concrete zone type- Parameters:
spatialContainer
- to queryboundingBox
- to apply- Returns:
- found matches
-
queryEdgeQuadtree
public static <T extends Edge> Collection<T> queryEdgeQuadtree(org.locationtech.jts.index.quadtree.Quadtree spatiallyIndexedEdgeTree, org.locationtech.jts.geom.Envelope searchBoundingBox)
Find edges spatially based on the provided bounding box and spatially indexed quadtree containing edges as values- Type Parameters:
T
- type of edge- Parameters:
searchBoundingBox
- to usespatiallyIndexedEdgeTree
- to consider- Returns:
- links found intersecting or within bounding box provided
-
-