Interface SpatialIndex


  • public interface SpatialIndex
    Object to query the nodes and edges of the graph in a spatial context.
    Author:
    Eduardo Ramos
    • Method Detail

      • getNodesInArea

        NodeIterable getNodesInArea​(Rect2D rect)
        Returns the nodes in the given area.
        Parameters:
        rect - area to query
        Returns:
        nodes in the area
      • getEdgesInArea

        EdgeIterable getEdgesInArea​(Rect2D rect)
        Returns the edges in the given area.
        Parameters:
        rect - area to query
        Returns:
        edges in the area
      • getBoundaries

        Rect2D getBoundaries()
        Returns the bounding rectangle that contains all nodes in the graph. The boundaries are calculated based on each node's position and size.
        Returns:
        the bounding rectangle, or null if there are no nodes