![]() |
MapLink Pro 11.2
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
Classes | |
class | link_iterator |
class | node_iterator |
class | turn_iterator |
Public Types | |
enum | find_type { tsl_nwk_find_both = 0 , tsl_nwk_find_links = 1 , tsl_nwk_find_nodes = 2 } |
Public Member Functions | |
bool | addPath (const char *dir_name) |
link_iterator | begin_links (const node_iterator &it) |
link_iterator | begin_links (long node_id) |
turn_iterator | begin_turns (long node_id) |
turn_iterator | begin_turns (const node_iterator &it) |
void | cacheSize (long new_size) |
void | cacheFlushLimit (long flush_limit) |
bool | clearCache () |
link_iterator | end_links (long node_id) |
link_iterator | end_links (const node_iterator &it) |
turn_iterator | end_turns (long node_id) |
turn_iterator | end_turns (const node_iterator &it) |
TSLNetworkQuery * | find (const TSLEnvelope *extent, const TSLNwkSelector &filter, TSLTiledNetwork::find_type filter_mode=TSLTiledNetwork::tsl_nwk_find_both) |
link_iterator | find_link (const TSLCoord &location, Long aperture) |
node_iterator | find_node (const TSLCoord &location, Long aperture) |
link_iterator | get_link (long link_id) |
node_iterator | get_node (long node_id) |
turn_iterator | get_turn (long turn_id) |
node_iterator | linkDestinNode (const link_iterator &it) |
node_iterator | linkSourceNode (const link_iterator &it) |
bool | loadData (const char *filename) |
bool | lockQuery (const TSLNetworkQuery &query, bool *all_loaded=0) |
bool | lockQuery (const TSLRouteQuery &query, bool *all_loaded=0) |
bool | lockRegion (const TSLEnvelope &extent, bool *all_loaded=0) |
bool | lockRegion (const TSLPolyline &polyline, bool *all_loaded=0) |
bool | removeData () |
TSLRouteQuery * | route (long from_node, long to_node, long *via_nodes, long via_count, TSLPathCost &cost, double max_cost) |
link_iterator | turnDestinLink (const turn_iterator &it) |
link_iterator | turnSourceLink (const turn_iterator &it) |
bool | unlockAll () |
bool | unlockQuery (const TSLNetworkQuery &query) |
bool | unlockQuery (const TSLRouteQuery &query) |
bool | unlockRegion (const TSLEnvelope &extent) |
bool | unlockRegion (const TSLPolyline &polyline) |
void | destroy () |
void * | operator new (size_t size) |
void * | operator new (size_t size, char *filename, int line) |
bool TSLTiledNetwork::addPath | ( | const char * | dir_name | ) |
Adds a directory path to the pathlist to search for individual tiles. By default the TSLTiledNetwork will search for tiles in the same directory as the TiledNetwork file. If Network tiles are located in other directories it will be necessary to inform the TSLTiledNetwork of where the tiles can be located.
dir_name | name of the directory to add to the search path. |
link_iterator TSLTiledNetwork::begin_links | ( | const node_iterator & | it | ) |
Returns a link_iterator into the global links list associated with the given node iterator.
it | node_iterator to obtain the links for |
link_iterator TSLTiledNetwork::begin_links | ( | long | node_id | ) |
Returns a link_iterator into the global links list associated with the given node id.
node_id | global id of the node to obtain the links for |
turn_iterator TSLTiledNetwork::begin_turns | ( | const node_iterator & | it | ) |
Return turn_iterator into the global turns list associated with the given node id.
it | node_iterator to obtain the turns for |
turn_iterator TSLTiledNetwork::begin_turns | ( | long | node_id | ) |
Return turn_iterator into the global turns list associated with the given node id.
node_id | global id for the node to obtain the turns for |
void TSLTiledNetwork::cacheFlushLimit | ( | long | flush_limit | ) |
This method allows the user to set the cache flush limit for the TSLTiled Network. When the cache is full the system will remove the LEAST recently used files to make room for the new data to load. The cache flush limit indicates the number of MOST recently used data files that the system will try keep in memory while flushing the cache. If the system cannot free enough memory and keep the flush limit number of files it will temporarily halve the flush limit until the cache memory usage is below 90% of the allowable cache size.
flush_limit | the number of files to (attempt to ) keep when flushing |
void TSLTiledNetwork::cacheSize | ( | long | new_size | ) |
This method allows the user to set the total filesize that the tile cache can use. The default tile cache is 20Mb
new_size | The size in kilobytes for the cache to hold. |
bool TSLTiledNetwork::clearCache | ( | ) |
This method requests the TSLTiledNetwork to clear all cached data from memory. After a call to clearCache any operations involving the TSLTiled Network will re-load all required data from disk. This will not clear any locked tiles from memory.
void TSLTiledNetwork::destroy | ( | ) |
Destructor for the object
link_iterator TSLTiledNetwork::end_links | ( | const node_iterator & | it | ) |
Returns a link_iterator to the last link of the global links list associated with the given node id.
it | node_iterator to the node to obtain the links for |
link_iterator TSLTiledNetwork::end_links | ( | long | node_id | ) |
Returns a link_iterator to the last link of the global links list associated with the given node id.
node_id | global id of the node to obtain the links for |
turn_iterator TSLTiledNetwork::end_turns | ( | const node_iterator & | it | ) |
Return turn_iterator to the last turn of the global turns list associated with the given node iterator.
it | node_iterator to the node to obtain the turns for |
turn_iterator TSLTiledNetwork::end_turns | ( | long | node_id | ) |
Return turn_iterator to the last turn of the global turns list associated with the given node id.
node_id | global id of the node to obtain the turns for |
TSLNetworkQuery * TSLTiledNetwork::find | ( | const TSLEnvelope * | extent, |
const TSLNwkSelector & | filter, | ||
TSLTiledNetwork::find_type | filter_mode = TSLTiledNetwork::tsl_nwk_find_both ) |
Will generate a TSLNetworkQueryObject which will contain read-only copies of all links and nodes which satisfy the criteria specified by the filter object. Note: the simplest filter object will return everything that is sent to it.
extent | region to query. specifying a very large region may take some time. |
filter | reference to a TSLNetworkSelector object whose methods will be called by the TSLTiledNetwork for any link and/or node which is within the specified extent. |
filter_mode | any of TSLTiledNetwork::find_both TSLTileNetwork::find_links TSLTileNetwork::find_nodes |
link_iterator TSLTiledNetwork::find_link | ( | const TSLCoord & | location, |
Long | aperture ) |
Find the nearest link based on location and aperture
Note complex searches ( e.g. based on attributes) can be achieved by the find routine.
location | centre point of area to search |
aperture | distance from the centre point to search |
node_iterator TSLTiledNetwork::find_node | ( | const TSLCoord & | location, |
Long | aperture ) |
Find the nearest node based on a location and aperture.
Note complex searches ( e.g. based on attributes) can be achieved by the find routine.
location | centre point of area to search |
aperture | distance from the centre point to search |
link_iterator TSLTiledNetwork::get_link | ( | long | link_id | ) |
Returns a link iterator based on the global ID
link_id | global id for the link. |
node_iterator TSLTiledNetwork::get_node | ( | long | node_id | ) |
Returns a node_iterator based on the global ID
node_id | global id for the node. |
turn_iterator TSLTiledNetwork::get_turn | ( | long | turn_id | ) |
Returns a turn_iterator based on the global ID
turn_id | global id for the turn. |
node_iterator TSLTiledNetwork::linkDestinNode | ( | const link_iterator & | it | ) |
Returns the link's destination node_iterator.
it | link_iterator to the link |
node_iterator TSLTiledNetwork::linkSourceNode | ( | const link_iterator & | it | ) |
Returns the link's source node iterator
it | link_iterator to the link |
bool TSLTiledNetwork::loadData | ( | const char * | filename | ) |
Load data from a file for the TSLTiledNetwork. If data is already loaded into this TSLTiledNetwork then it will be removed from memory and all references to it deleted. The specified filename must refer to a tiled network.
filename | fully specified path to the tiled network file |
bool TSLTiledNetwork::lockQuery | ( | const TSLNetworkQuery & | query, |
bool * | all_loaded = 0 ) |
Loads the tiles associated with the links and nodes contained within the TSLNetworkQuery object. Only as many tiles as can be held by the cache will be loaded. All_loaded indicates if all the tiles in the region were loaded.
query | reference to an existing query |
all_loaded | boolean value to indicate if all the required tiles were loaded. |
bool TSLTiledNetwork::lockQuery | ( | const TSLRouteQuery & | query, |
bool * | all_loaded = 0 ) |
Loads the tiles associated with the links and nodes contained within the TSLRouteQuery object. Only as many tiles as can be held by the cache will be loaded. All_loaded indicates if all the tiles in the region were loaded.
query | reference to an existing query |
all_loaded | boolean value to indicate if all the required tiles were loaded. |
bool TSLTiledNetwork::lockRegion | ( | const TSLEnvelope & | extent, |
bool * | all_loaded = 0 ) |
Loads all the tiles that overlap with the extent and locks them in memory so that they will not be cleared when the memory cache is automatically cleared. If the region includes tiles which have already been locked then their locked count will be incremented. It is important when locking a region that the all_loaded value is checked to make sure that the lock was successful.
extent | rectangular extent to lock |
all_loaded | boolean value to indicate if all the required tiles were loaded. |
bool TSLTiledNetwork::lockRegion | ( | const TSLPolyline & | polyline, |
bool * | all_loaded = 0 ) |
Loads all the tiles that overlap with the polyline and locks them in memory so that they will not be cleared when the memory cache is automatically cleared. If the region includes tiles which have already been locked then their locked count will be incremented. It is important when locking a region that the all_loaded value is checked to make sure that the lock was successful.
polyline | TSLPolyline object that identifies a path |
all_loaded | boolean value to indicate if all the required tiles were loaded. |
void * TSLTiledNetwork::operator new | ( | size_t | size | ) |
These are here to avoid being documented Allocation override for API redirection.
void * TSLTiledNetwork::operator new | ( | size_t | size, |
char * | filename, | ||
int | line ) |
When included in an MFC application in debug mode, the debug new expects this to be here. Override it and return the same as the normal one. The library must include it when compiled in release mode, since the user's application may be in debug mode.
bool TSLTiledNetwork::removeData | ( | ) |
Clears all data attached to this TSLTiledNetworkLayer.
TSLRouteQuery * TSLTiledNetwork::route | ( | long | from_node, |
long | to_node, | ||
long * | via_nodes, | ||
long | via_count, | ||
TSLPathCost & | cost, | ||
double | max_cost ) |
Will generate a NetworkRouteQuery object which contains copies of all the links and nodes involved in the best route returned. The links and nodes objects returned in the NetworkRouteQuery object will be read-only copies of the originals. This will allow the route to be analysed without the need for the original tiles
from_node | global id of the start node for the route. |
to_node | global id of the destination node for the route. |
via_nodes | list of global ids for nodes to visit along the route. |
via_count | number of via nodes contained in via_nodes. |
cost | cost object for the path ( as in standard network ) |
max_cost | An upper bound for the cost of a path. Links from nodes whose cost exceeds max_cost will not be traversed. |
link_iterator TSLTiledNetwork::turnDestinLink | ( | const turn_iterator & | it | ) |
Returns the turns destination link iterator.
it | turn_iterator to the turn |
link_iterator TSLTiledNetwork::turnSourceLink | ( | const turn_iterator & | it | ) |
Returns the turns source link iterator.
it | turn_iterator to the turn |
bool TSLTiledNetwork::unlockAll | ( | ) |
Unlocks the all currently locked tiles and sets their lock count to zero. UnlockAll does not mean the tiles will immediately be freed from memory. This will be done when the memory cache is automatically cleared if the unlocked tiles are the "least recently used".
bool TSLTiledNetwork::unlockQuery | ( | const TSLNetworkQuery & | query | ) |
Unlocks the tiles that relate to the specified query if they are currently loaded into memory. If a tile has been locked more than once then this will decrement its lock count. Unlocking a region so does not mean the tiles will immediately be freed from memory. This will be done when the memory cache is automatically cleared if the unlocked tiles are the "least recently used".
query | TSLNetworkQuery object |
bool TSLTiledNetwork::unlockQuery | ( | const TSLRouteQuery & | query | ) |
Unlocks the tiles that relate to the specified query if they are currently loaded into memory. If a tile has been locked more than once then this will decrement its lock count. Unlocking a region so does not mean the tiles will immediately be freed from memory. This will be done when the memory cache is automatically cleared if the unlocked tiles are the "least recently used".
query | TSLRouteQuery object |
bool TSLTiledNetwork::unlockRegion | ( | const TSLEnvelope & | extent | ) |
Unlocks the tiles that overlap with the specified extent if they are currently loaded into memory. If a tile has been locked more than once then this will decrement its lock count. Unlocking a region so does not mean the tiles will immediately be freed from memory. This will be done when the memory cache is automatically cleared if the unlocked tiles are the "least recently used".
extent | rectangular extent to unlock |
bool TSLTiledNetwork::unlockRegion | ( | const TSLPolyline & | polyline | ) |
Unlocks the tiles that overlap with the specified polyline if they are currently loaded into memory. If a tile has been locked more than once then this will decrement its lock count. Unlocking a region so does not mean the tiles will immediately be freed from memory. This will be done when the memory cache is automatically cleared if the unlocked tiles are the "least recently used".
polyline | TSLPolyline object specifying a path |