Package org.openstreetmap.josm.actions
Class AlignInLineAction.Line
- java.lang.Object
-
- org.openstreetmap.josm.actions.AlignInLineAction.Line
-
- Enclosing class:
- AlignInLineAction
static class AlignInLineAction.Line extends java.lang.Object
Class that represent a line
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Command
intersectionCommand(Node n, AlignInLineAction.Line other)
Intersection of two line.Command
projectionCommand(Node n)
Orthogonal projection of a node N along this line.
-
-
-
Constructor Detail
-
Line
Line(Node first, Node last) throws AlignInLineAction.InvalidSelection
Init a line by 2 nodes.- Parameters:
first
- One point of the linelast
- Other point of the line- Throws:
AlignInLineAction.InvalidSelection
- if nodes have same coordinates
-
Line
Line(Way way) throws AlignInLineAction.InvalidSelection
Init a line equation from a way.- Parameters:
way
- Use extremity of this way to compute line equation- Throws:
AlignInLineAction.InvalidSelection
- if nodes have same coordinates
-
-
Method Detail
-
projectionCommand
public Command projectionCommand(Node n)
Orthogonal projection of a node N along this line.- Parameters:
n
- Node to be projected- Returns:
- The command that do the projection of this node
-
intersectionCommand
public Command intersectionCommand(Node n, AlignInLineAction.Line other) throws AlignInLineAction.InvalidSelection
Intersection of two line.- Parameters:
n
- Node to move to the intersectionother
- Second line for intersection- Returns:
- The command that move the node
- Throws:
AlignInLineAction.InvalidSelection
- if two parallels ways found
-
-