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
TLinkGetFirstLink ()
TNodeGetFirstNode ()
virtual TNodeNewNode ()
virtual TLinkNewLink ()
void AddNode (TNode *pNode)
void AddLink (TLink *pLink)
virtual TNodeAddNewNode ()
virtual TLinkAddNewLink ()
void RemoveNode (TNode *pNode)
void RemoveLink (TLink *pLink)
void DetachLink (TLink *pLink)
TNodeFindNodeByID (int id)
TNodeFindNodeAtPoint (const DPoint2 &point, double epsilon)
int RemoveUnusedNodes ()
bool ReadRMF (const char *filename)
bool WriteRMF (const char *filename)
vtCRSGetAtProjection ()

Protected Attributes

DRECT m_extents
bool m_bValidExtents
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.