Class GeoContainerUtils


  • public class GeoContainerUtils
    extends Object
    Uitlity class to convert various PLANit entities into spatially indexed quad tree containers
    • 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 values
      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
      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.
      static <T extends Zone>
      org.locationtech.jts.index.quadtree.Quadtree
      toGeoIndexed​(Zones<T> zones)
      Created quadtree based on transfer zone envelopes as spatial index.
      static <T extends GraphEntities<? extends Edge>>
      org.locationtech.jts.index.quadtree.Quadtree
      toGeoIndexed​(T edges)
      Created quadtree based on edge envelopes as spatial index.
    • Constructor Detail

      • GeoContainerUtils

        public GeoContainerUtils()
    • 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 ZoneCollection<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 query
        boundingBox - to apply
        Returns:
        found matches
      • queryEdgeQuadtree

        public static <T extends EdgeCollection<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 use
        spatiallyIndexedEdgeTree - to consider
        Returns:
        links found intersecting or within bounding box provided