Class UnconnectedWays.MyWaySegment

java.lang.Object
org.openstreetmap.josm.data.validation.tests.UnconnectedWays.MyWaySegment
Enclosing class:
UnconnectedWays

private class UnconnectedWays.MyWaySegment extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • 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, 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 node
      visited - set of visited nodes
      len - length of the travelled route
      parent - the previous parent way
      Returns:
      true if a reasonable connection was found
    • calcClosest

      private EastNorth calcClosest(Node n)
    • getDist

      double getDist(Node n)
    • nearby

      private boolean nearby(Node n, double dist)
    • getBounds

      private BBox getBounds(double fudge)
    • nearbyNodes

      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)