Class ValUtil

    • Constructor Detail

    • Method Detail

      • getWaysInCell

        public static List<List<Way>> getWaysInCell​(Way w,
                                                    Map<Point2D,​List<Way>> cellWays)
        Returns the start and end cells of a way.
        Parameters:
        w - The way
        cellWays - The map with all cells
        Returns:
        A list with all the cells the way starts or ends
      • getSegmentCells

        public static List<Point2DgetSegmentCells​(Node n1,
                                                    Node n2,
                                                    double gridDetail)
        Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.
        Parameters:
        n1 - The first node.
        n2 - The second node.
        gridDetail - The detail of the grid. Bigger values give smaller cells, but a bigger number of them.
        Returns:
        A list with the coordinates of all cells
        Throws:
        IllegalArgumentException - if n1 or n2 is null or without coordinates
      • getSegmentCells

        public static List<Point2DgetSegmentCells​(EastNorth en1,
                                                    EastNorth en2,
                                                    double gridDetail)
        Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.
        Parameters:
        en1 - The first EastNorth.
        en2 - The second EastNorth.
        gridDetail - The detail of the grid. Bigger values give smaller cells, but a bigger number of them.
        Returns:
        A list with the coordinates of all cells
        Throws:
        IllegalArgumentException - if en1 or en2 is null
        Since:
        6869