Package org.openstreetmap.josm.actions
Class OrthogonalizeAction.WayData
- java.lang.Object
-
- org.openstreetmap.josm.actions.OrthogonalizeAction.WayData
-
- Enclosing class:
- OrthogonalizeAction
private static class OrthogonalizeAction.WayData extends java.lang.Object
Class contains everything we need to know about a single way.
-
-
Field Summary
Fields Modifier and Type Field Description double
heading
heading of segSum == approximate heading of the wayint
nNode
Number of Nodes of the Wayint
nSeg
Number of Segments of the WayOrthogonalizeAction.Direction[]
segDirections
Direction of the segmentsEastNorth
segSum
(Vector-)sum of all horizontal segments plus the sum of all verticaljava.util.List<Node>
wayNodes
The assigned way
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
calcDirections(OrthogonalizeAction.Direction pInitialDirection)
Estimate the direction of the segments, given the first segment points in the directionpInitialDirection
.
-
-
-
Field Detail
-
nSeg
public final int nSeg
Number of Segments of the Way
-
nNode
public final int nNode
Number of Nodes of the Way
-
segDirections
public final OrthogonalizeAction.Direction[] segDirections
Direction of the segments
-
heading
public double heading
heading of segSum == approximate heading of the way
-
-
Method Detail
-
calcDirections
public void calcDirections(OrthogonalizeAction.Direction pInitialDirection) throws OrthogonalizeAction.InvalidUserInputException
Estimate the direction of the segments, given the first segment points in the directionpInitialDirection
. Then sum up all horizontal / vertical segments to have a good guess for the heading of the entire way.- Parameters:
pInitialDirection
- initial direction- Throws:
OrthogonalizeAction.InvalidUserInputException
- if selected ways have an angle different from 90 or 180 degrees
-
-