|
CartoType API
|
#include <cartotype_router.h>
Classes | |
| class | MFilter |
Public Member Functions | |
| CT_IMPORT CNode * | Node (TResult &aError, const TPoint &aPoint) |
| CT_IMPORT int32 | HeuristicWeight () |
| CT_IMPORT TPointFormat | PointFormat () |
| CT_IMPORT TResult | LoadData (const TRect &aExtent) |
| CT_IMPORT TResult | LoadData (const TPoint &aPoint) |
| CT_IMPORT bool | UseLevels (bool aSet) |
Static Public Member Functions | |
| static CT_IMPORT CMapDataRouterInfo * | New (TResult &aError, CMapDataBase &aMapDataBase, MFilter *aFilter=NULL) |
| static CT_IMPORT CMapDataRouterInfo * | NewRoadOrWalkingRouter (TResult &aError, CMapDataBase &aMapDataBase, bool aWalking, bool aShortest=false) |
| static CMapDataRouterInfo * | NewRoadRouter (TResult &aError, CMapDataBase &aMapDataBase) |
| static CMapDataRouterInfo * | NewWalkingRouter (TResult &aError, CMapDataBase &aMapDataBase) |
An implementation of CRouterInfo that deduces the route network from road data supplied by a CMapDataBase object.
| CT_EXPORT int32 CMapDataRouterInfo::HeuristicWeight | ( | ) | [virtual] |
Return the weight by which distances are multiplied to get the lowest possible cost of traversing a distance. This must be the weight for the fastest road type in the data. It is called the 'heuristic weight' because the term 'heuristic' is used for the estimated cost in discussions of the A-star algorithm.
Implements CartoType::Router::CRouterInfo.
| CT_EXPORT CMapDataRouterInfo * CMapDataRouterInfo::New | ( | TResult & | aError, |
| CMapDataBase & | aMapDataBase, | ||
| MFilter * | aFilter = NULL |
||
| ) | [static] |
Create a router info object. If no filter is specified this function creates car journeys based only on road layers, and has the same effect as calling NewRoadRouter. The filter remains the property of the caller, who must delete it.
| CT_EXPORT CMapDataRouterInfo * CMapDataRouterInfo::NewRoadOrWalkingRouter | ( | TResult & | aError, |
| CMapDataBase & | aMapDataBase, | ||
| bool | aWalking, | ||
| bool | aShortest = false |
||
| ) | [static] |
Create a router info object for road or walking routes. Road routes use roads only. Walking routes use roads (except motorways and dual carriageways) and footpaths. Roads must be in any set of layers with names ending in 'road' (except 'railroad'). Footpaths must be in a 'path' layer and contain level information in the same way as roads.
Return a pointer to the nearest node to aPoint.
Implements CartoType::Router::CRouterInfo.
| CT_EXPORT TPointFormat CMapDataRouterInfo::PointFormat | ( | ) | [virtual] |
Return the format of the map data points.
Implements CartoType::Router::CRouterInfo.
| CT_EXPORT bool CMapDataRouterInfo::UseLevels | ( | bool | aSet | ) |
Tell the router whether or not to use levels when deciding connectivity. The default setting is true. If levels are used, objects at different levels can connect only at their endpoints. If levels are ignored, all shared points in different objects are connected.
The return value is the previous setting.
1.7.5.1