uk.me.parabola.imgfmt.app.net
Class RouteNode

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.net.RouteNode
All Implemented Interfaces:
java.lang.Comparable<RouteNode>

public class RouteNode
extends java.lang.Object
implements java.lang.Comparable<RouteNode>

A routing node with its connections to other nodes via roads.

Author:
Steve Ratcliffe

Field Summary
static int ATH_DEFAULT_MASK
           
 
Constructor Summary
RouteNode(Coord coord)
          Deprecated. 
 
Method Summary
 void addArc(RouteArc arc)
           
 void addIncomingArc(RouteArc arc)
           
 void addRestriction(RouteRestriction restr)
           
 void addThroughRoute(long roadIdA, long roadIdB)
           
 java.lang.Iterable<? extends RouteArc> arcsIteration()
           
 int boundSize()
          Provide an upper bound to the size (in bytes) that writing this node will take.
 void checkRoundaboutFlares(int maxFlareLengthRatio)
           
 void checkRoundabouts()
           
 int compareTo(RouteNode otherNode)
           
 void discard()
           
 RouteArc getArcTo(RouteNode otherNode)
           
 Coord getCoord()
           
 int getNodeClass()
          Return the node's class, which is the maximum of classes of the roads it's on.
 int getOffsetNod1()
           
 java.util.List<RouteRestriction> getRestrictions()
           
 boolean isBoundary()
           
 void reportDeadEnds(int level)
           
 void reportSimilarArcs()
           
protected  void setBoundary(boolean b)
           
 void setOffsets(Coord centralPoint)
           
 java.lang.String toString()
           
 void tweezeArcs(int mask)
           
 void write(ImgFileWriter writer)
          Writes a nod1 entry.
 void writeNod3(ImgFileWriter writer)
          Writes a nod3 entry.
 void writeSecond(ImgFileWriter writer)
          Second pass over the nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATH_DEFAULT_MASK

public static final int ATH_DEFAULT_MASK
See Also:
Constant Field Values
Constructor Detail

RouteNode

@Deprecated
public RouteNode(Coord coord)
Deprecated. 

Method Detail

setBoundary

protected void setBoundary(boolean b)

isBoundary

public boolean isBoundary()

addArc

public void addArc(RouteArc arc)

addIncomingArc

public void addIncomingArc(RouteArc arc)

addRestriction

public void addRestriction(RouteRestriction restr)

getArcTo

public RouteArc getArcTo(RouteNode otherNode)

boundSize

public int boundSize()
Provide an upper bound to the size (in bytes) that writing this node will take. Should be called only after arcs and restrictions have been set. The size of arcs depends on whether or not they are internal to the RoutingCenter.


write

public void write(ImgFileWriter writer)
Writes a nod1 entry.


writeNod3

public void writeNod3(ImgFileWriter writer)
Writes a nod3 entry.


discard

public void discard()

getOffsetNod1

public int getOffsetNod1()

setOffsets

public void setOffsets(Coord centralPoint)

getCoord

public Coord getCoord()

writeSecond

public void writeSecond(ImgFileWriter writer)
Second pass over the nodes. Fill in pointers and Table A indices.


getNodeClass

public int getNodeClass()
Return the node's class, which is the maximum of classes of the roads it's on.


arcsIteration

public java.lang.Iterable<? extends RouteArc> arcsIteration()

getRestrictions

public java.util.List<RouteRestriction> getRestrictions()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(RouteNode otherNode)
Specified by:
compareTo in interface java.lang.Comparable<RouteNode>

tweezeArcs

public void tweezeArcs(int mask)

checkRoundabouts

public void checkRoundabouts()

checkRoundaboutFlares

public void checkRoundaboutFlares(int maxFlareLengthRatio)

reportSimilarArcs

public void reportSimilarArcs()

reportDeadEnds

public void reportDeadEnds(int level)

addThroughRoute

public void addThroughRoute(long roadIdA,
                            long roadIdB)