vtdata library
Public Member Functions | Protected Attributes | List of all members
vtRoadMap Class Reference

Public Member Functions

void DeleteElements ()
 
DRECT GetMapExtent ()
 
void ComputeExtents ()
 
int NumLinks () const
 
int NumNodes () const
 
TLink * GetFirstLink ()
 
TNode * GetFirstNode ()
 
virtual TNode * NewNode ()
 
virtual TLink * NewLink ()
 
void AddNode (TNode *pNode)
 
void AddLink (TLink *pLink)
 
virtual TNode * AddNewNode ()
 
virtual TLink * AddNewLink ()
 
void RemoveNode (TNode *pNode)
 
void RemoveLink (TLink *pLink)
 
void DetachLink (TLink *pLink)
 
TNode * FindNodeByID (int id)
 
TNode * FindNodeAtPoint (const DPoint2 &point, double epsilon)
 
int RemoveUnusedNodes ()
 
bool ReadRMF (const char *filename)
 
bool WriteRMF (const char *filename)
 
vtCRS & GetAtProjection ()
 

Protected Attributes

DRECT m_extents
 
bool m_bValidExtents
 
TLink * m_pFirstLink
 
TNode * m_pFirstNode
 
vtCRS m_proj
 

Detailed Description

vtRoadMap contains a sets of nodes (TNode) and links (TLink) which define a transportation network.

It can be loaded and saved from RMF files, an ad-hoc Road Map Format which is overdue to be replaced by some clean, extensible standard for transportation networks. Unforunately, such a standard does not yet exist.

Member Function Documentation

TNode * vtRoadMap::FindNodeAtPoint ( const DPoint2 &  point,
double  epsilon 
)

Find the node closest to the indicated point. Ignore nodes more than epsilon units away from the point.

bool vtRoadMap::ReadRMF ( const char *  filename)

Read an RMF (Road Map File) Returns true if operation sucessful.

void vtRoadMap::RemoveLink ( TLink *  pLink)

Remove a link, which also deletes it.

void vtRoadMap::RemoveNode ( TNode *  pNode)

Remove a node, which also deletes it.