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

java.lang.Object
  extended by uk.me.parabola.imgfmt.app.ImgFile
      extended by uk.me.parabola.imgfmt.app.net.NODFile
All Implemented Interfaces:
java.io.Closeable

public class NODFile
extends ImgFile

The NOD file that contains routing information. NOD1 contains several groups of routing nodes. NOD2 contains road data with links into NOD1. NOD1 contains links back to NET (and NET contains links to NOD2). So there is a loop and we have to write one section first, retaining the offsets and then go back and fill in offsets that were found later. I'm choosing to this with Table A, as the records are fixed size and so we can write them blank the first time and then go back and fix them up, once the NET offsets are known. So we are writing NOD first before NET and NOD1 before NOD2. Once NET is written then go back to Table A and fix the label offsets in RGN.

Author:
Steve Ratcliffe

Constructor Summary
NODFile(ImgChannel chan, boolean write)
           
 
Method Summary
 void setNetwork(java.util.List<RouteCenter> centers, java.util.List<RoadDef> roads, java.util.List<RouteNode> boundary)
           
 void write()
           
 void writePost()
           
 
Methods inherited from class uk.me.parabola.imgfmt.app.ImgFile
close, getHeader, getReader, getSize, getWriter, isWritable, position, position, setHeader, setReader, setWriter, sync
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NODFile

public NODFile(ImgChannel chan,
               boolean write)
Method Detail

write

public void write()

writePost

public void writePost()

setNetwork

public void setNetwork(java.util.List<RouteCenter> centers,
                       java.util.List<RoadDef> roads,
                       java.util.List<RouteNode> boundary)