Class UnconnectedWays.MyWaySegment
- java.lang.Object
-
- org.openstreetmap.josm.data.validation.tests.UnconnectedWays.MyWaySegment
-
- Enclosing class:
- UnconnectedWays
private class UnconnectedWays.MyWaySegment extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description MyWaySegment(Way w, Node n1, Node n2, boolean concersArea)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private EastNorth
calcClosest(Node n)
private BBox
getBounds(double fudge)
(package private) double
getDist(Node n)
(package private) boolean
isConnectedTo(Node startNode)
Check if the given node is connected to this segment using a reasonable short way.private boolean
isConnectedTo(Node node, java.util.Set<Node> visited, double len, Way parent)
Check if the given node is connected to this segment using a reasonable short way.private boolean
isObstacle(Way w)
private boolean
nearby(Node n, double dist)
(package private) java.util.Collection<Node>
nearbyNodes(double dist)
We know that any point near the line segment must be at least as close as the other end of the line, plus a little fudge for the distance away (dist)private boolean
obstacleBetween(Node endnode)
-
-
-
Constructor Detail
-
MyWaySegment
MyWaySegment(Way w, Node n1, Node n2, boolean concersArea)
-
-
Method Detail
-
isConnectedTo
boolean isConnectedTo(Node startNode)
Check if the given node is connected to this segment using a reasonable short way.- Parameters:
startNode
- the node- Returns:
- true if a reasonable connection was found
-
isConnectedTo
private boolean isConnectedTo(Node node, java.util.Set<Node> visited, double len, Way parent)
Check if the given node is connected to this segment using a reasonable short way.- Parameters:
node
- the given nodevisited
- set of visited nodeslen
- length of the travelled routeparent
- the previous parent way- Returns:
- true if a reasonable connection was found
-
calcClosest
private EastNorth calcClosest(Node n)
-
nearbyNodes
java.util.Collection<Node> nearbyNodes(double dist)
We know that any point near the line segment must be at least as close as the other end of the line, plus a little fudge for the distance away (dist)- Parameters:
dist
- fudge to add- Returns:
- collection of nearby nodes
-
obstacleBetween
private boolean obstacleBetween(Node endnode)
-
isObstacle
private boolean isObstacle(Way w)
-
-