Class ValUtil
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.util.ValUtil
-
public final class ValUtil extends java.lang.Object
Utility class
-
-
Constructor Summary
Constructors Modifier Constructor Description privateValUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.List<java.awt.geom.Point2D>getSegmentCells(EastNorth en1, EastNorth en2, double gridDetail)Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.static java.util.List<java.awt.geom.Point2D>getSegmentCells(ILatLon n1, ILatLon n2, double gridDetail)Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.static java.util.List<java.awt.geom.Point2D>getSegmentCells(Node n1, Node n2, double gridDetail)Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.static java.util.List<java.util.List<Way>>getWaysInCell(Way w, java.util.Map<java.awt.geom.Point2D,java.util.List<Way>> cellWays)Returns the start and end cells of a way.
-
-
-
Constructor Detail
-
ValUtil
private ValUtil()
-
-
Method Detail
-
getWaysInCell
public static java.util.List<java.util.List<Way>> getWaysInCell(Way w, java.util.Map<java.awt.geom.Point2D,java.util.List<Way>> cellWays)
Returns the start and end cells of a way.- Parameters:
w- The waycellWays- The map with all cells- Returns:
- A list with all the cells the way starts or ends
-
getSegmentCells
public static java.util.List<java.awt.geom.Point2D> getSegmentCells(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:
java.lang.IllegalArgumentException- if n1 or n2 isnullor without coordinates
-
getSegmentCells
public static java.util.List<java.awt.geom.Point2D> getSegmentCells(ILatLon n1, ILatLon n2, double gridDetail)
Returns the coordinates of all cells in a grid that a line between 2 nodes intersects with.- Parameters:
n1- The first latlon.n2- The second latlon.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:
java.lang.IllegalArgumentException- if n1 or n2 isnullor without coordinates- Since:
- 18553
-
getSegmentCells
public static java.util.List<java.awt.geom.Point2D> getSegmentCells(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:
java.lang.IllegalArgumentException- if en1 or en2 isnull- Since:
- 6869
-
-