|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.me.parabola.imgfmt.app.net.RoadDef
public class RoadDef
A road definition. This ties together all segments of a single road and provides street address information. This corresponds to an entry in NET1, which is linked with the polylines making up this road in RGN. Links to RGN are written via RoadIndex, while writing links from RGN to NET1 is delayed via setOffsetWriter. If the map includes routing, the NET1 record also points to a NOD2 record, written by writeNod2. Edges in the routing graph ("arcs") link to the corresponding road via the RoadDef, storing the NET1 offset via TableA, which also includes some road information.
Constructor Summary | |
---|---|
RoadDef(long id,
java.lang.String name)
|
Method Summary | |
---|---|
void |
addLabel(Label l)
|
void |
addOffsetTarget(int position,
int flags)
Add a target location in the RGN section where we should write the offset of this road def when it is written to NET. |
void |
addPolylineRef(Polyline pl)
Add a polyline to this road. |
int |
compareTo(RoadDef other)
|
boolean |
connectedTo(RoadDef other,
int level)
|
boolean |
doDeadEndCheck()
|
void |
doDeadEndCheck(boolean dec)
|
boolean |
doFlareCheck()
|
void |
doFlareCheck(boolean fc)
|
boolean |
ferry()
|
void |
ferry(boolean f)
|
City |
getCity()
|
long |
getId()
|
Label[] |
getLabels()
|
java.lang.String |
getName()
|
int |
getOffsetNet1()
Return the offset of this road's NET1 entry. |
int |
getRoadClass()
|
int |
getRoadSpeed()
|
int |
getTabAAccess()
|
int |
getTabAInfo()
|
boolean |
hasInternalNodes()
Does the road have any nodes besides start and end? This affects whether we need to write extra bits in the bitstream in RGN. |
boolean |
isLinkRoad()
|
boolean |
isOneway()
|
boolean |
isRoundabout()
|
boolean |
isSynthesised()
|
boolean |
messagePreviouslyIssued(java.lang.String key)
|
boolean |
paved()
|
void |
paved(boolean p)
|
void |
putSortedRoadEntry(ImgFileWriter writer,
Label label)
|
void |
setAccess(boolean[] access)
|
void |
setCity(City city)
|
void |
setInternalNodes(boolean n)
|
void |
setLength(double l)
Set the road length (in meters). |
void |
setLinkRoad(boolean lr)
|
void |
setNode(RouteNode node)
Set the routing node associated with this road. |
void |
setNoThroughRouting()
|
void |
setNumNodes(int n)
|
void |
setOneway()
|
void |
setRoadClass(int roadClass)
|
void |
setRoundabout(boolean r)
|
void |
setSpeed(int speed)
|
void |
setStartsWithNode(boolean s)
|
void |
setSynthesised(boolean s)
|
void |
setToll()
|
void |
setZip(Zip zip)
|
java.lang.String |
toString()
|
void |
writeNod2(ImgFileWriter writer)
Write this road's NOD2 entry. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public RoadDef(long id, java.lang.String name)
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public long getId()
public void putSortedRoadEntry(ImgFileWriter writer, Label label)
public void addLabel(Label l)
public Label[] getLabels()
public void addPolylineRef(Polyline pl)
public boolean connectedTo(RoadDef other, int level)
public void setLength(double l)
public void addOffsetTarget(int position, int flags)
position
- The offset in RGN.flags
- The flags that should be set.public boolean hasInternalNodes()
public void setInternalNodes(boolean n)
public void setNode(RouteNode node)
public void setStartsWithNode(boolean s)
public void setNumNodes(int n)
public void writeNod2(ImgFileWriter writer)
writer
- A writer positioned in NOD2.public int getOffsetNet1()
public void setToll()
public void setNoThroughRouting()
public void setAccess(boolean[] access)
public int getTabAInfo()
public int getTabAAccess()
public void setRoadClass(int roadClass)
public int getRoadClass()
public void setSpeed(int speed)
public int getRoadSpeed()
public void setOneway()
public boolean isOneway()
public void setCity(City city)
public void setZip(Zip zip)
public int compareTo(RoadDef other)
compareTo
in interface java.lang.Comparable<RoadDef>
public City getCity()
public boolean paved()
public void paved(boolean p)
public void ferry(boolean f)
public boolean ferry()
public void setRoundabout(boolean r)
public boolean isRoundabout()
public void setLinkRoad(boolean lr)
public boolean isLinkRoad()
public void setSynthesised(boolean s)
public boolean isSynthesised()
public void doFlareCheck(boolean fc)
public boolean doFlareCheck()
public void doDeadEndCheck(boolean dec)
public boolean doDeadEndCheck()
public boolean messagePreviouslyIssued(java.lang.String key)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |