Package org.openstreetmap.josm.actions
Class OrthogonalizeAction.WayData
java.lang.Object
org.openstreetmap.josm.actions.OrthogonalizeAction.WayData
- Enclosing class:
- OrthogonalizeAction
Class contains everything we need to know about a single way.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleheading of segSum == approximate heading of the wayfinal intNumber of Nodes of the Wayfinal intNumber of Segments of the Wayfinal OrthogonalizeAction.Direction[]Direction of the segments(Vector-)sum of all horizontal segments plus the sum of all verticalThe assigned way -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcalcDirections(OrthogonalizeAction.Direction pInitialDirection) Estimate the direction of the segments, given the first segment points in the directionpInitialDirection.
-
Field Details
-
wayNodes
The assigned way -
nSeg
Number of Segments of the Way -
nNode
Number of Nodes of the Way -
segDirections
Direction of the segments -
segSum
(Vector-)sum of all horizontal segments plus the sum of all vertical -
heading
heading of segSum == approximate heading of the way
-
-
Constructor Details
-
WayData
-
-
Method Details
-
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
-