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 doubleheadingheading of segSum == approximate heading of the wayintnNodeNumber of Nodes of the WayintnSegNumber of Segments of the WayOrthogonalizeAction.Direction[]segDirectionsDirection of the segmentsEastNorthsegSum(Vector-)sum of all horizontal segments plus the sum of all verticaljava.util.List<Node>wayNodesThe assigned way
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcalcDirections(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
-
-