openlr.map.utils
Class NodeCheck

java.lang.Object
  extended by openlr.map.utils.NodeCheck

public final class NodeCheck
extends Object

The Class NodeCheck checks the validity of a node. A node is invalid if it is not possible to leave a path at this node (no start of a deviation possible).

OpenLR is a trade mark of TomTom International B.V.

email: software@openlr.org

Author:
TomTom International B.V.

Method Summary
static boolean isPair(Line line1, Line line2)
          Checks if line1 and line2 connect only two nodes and point into two different directions.
static boolean isValidNode(Node n)
          Checks if node n is valid.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValidNode

public static boolean isValidNode(Node n)
Checks if node n is valid. The method distinguishes two cases for a node being invalid.

Parameters:
n - the node
Returns:
true, if node n is valid, otherwise false

isPair

public static boolean isPair(Line line1,
                             Line line2)
Checks if line1 and line2 connect only two nodes and point into two different directions. So one line is the opposite direction of the other one.

Parameters:
line1 - the first line
line2 - the second line
Returns:
true, if the lines have start/end nodes in common and define two different directions


Copyright © 2013 TomTom International B.V.. All Rights Reserved.