CartoType .NET API 7.8.2, 2022-03-25
for development in C#, Visual Basic and other .NET languages
|
A routing profile: parameters determining the type of route, including road speeds, bonuses and penalties, and vehicle type. A road type will not be used if its speed plus bonus is equal to or less than zero. More...
#include <CartoTypeWrapper.h>
Public Member Functions | |
RouteProfile (RouteProfileType aProfileType) | |
Creates a RouteProfile of one of the standard types. | |
Result | ReadFromXmlFile (String^ aFileName) |
Reads the route profile from an file in XML format. | |
Result | ReadFromXmlString (String^ aString) |
Reads the route profile from a string in XML format. | |
Result | WriteAsXmlFile (String^ aFileName) |
Writes the route profile to a file in XML format. | |
String ^ | WriteAsXmlString () |
Creates an XML string representing the route profile. | |
Public Attributes | |
literal int | AccessMask = 0x7FF00000 |
A mask for access restrictions not including the 'other access' flag. | |
literal int | WrongWayFlag = 0x00100000 |
This arc goes the wrong way along a one-way road but it can be used by pedestrians and emergency vehicles. | |
literal int | BicycleAccessFlag = 0x0020000 |
No access for bicycles. | |
literal int | MotorCycleAccessFlag = 0x0040000 |
No access for motorcycles. | |
literal int | CarAccessFlag = 0x0080000 |
No access for cars. | |
literal int | HighOccupancyAccessFlag = 0x0100000 |
No access for high occupancy vehicles. | |
literal int | LightGoodsAccessFlag = 0x02000000 |
No access for light goods vehicles. | |
literal int | HeavyGoodsAccessFlag = 0x04000000 |
No access for heavy goods vehicles. | |
literal int | BusAccessFlag = 0x08000000 |
No access for buses. | |
literal int | TaxiAccessFlag = 0x10000000 |
No access for taxis. | |
literal int | PedestrianAccessFlag = 0x20000000 |
No access for pedestrians. | |
literal int | EmergencyAccessFlag = 0x40000000 |
No access for emergency vehicles. | |
literal int | OtherAccessFlag = 0x80000000 |
Other access restrictions exist such as weight, length, width, height or for vehicles carrying hazardous materials. | |
literal int | BicycleAccessOnly = AccessMask & ~(WrongWayFlag | BicycleAccessFlag) |
Bicycle access only. | |
literal int | AllMotorVehicles = AccessMask & ~(WrongWayFlag | PedestrianAccessFlag | BicycleAccessFlag) |
Access flags affect all motor vehicles; synonym of BicycleAccessOnly. | |
literal int | BicycleAndPedestrianAccessOnly = AllMotorVehicles |
Bicycle and pedestrian access only; synonym of AllMotorVehicles. | |
literal int | NoVehicularAccess = AccessMask & ~(WrongWayFlag | PedestrianAccessFlag) |
No vehicular access. | |
literal int | AllVehicles = NoVehicularAccess |
Access flags affect all vehicles; synonym of NoVehicularAccess. | |
literal int | Motorway = 0 |
The index for motorways in the speed and bonus arrays. | |
literal int | MotorwayLink = 1 |
The index for motorway link roads in the speed and bonus arrays. | |
literal int | TrunkRoad = 2 |
The index for trunk roads in the speed and bonus arrays. | |
literal int | TrunkRoadLink = 3 |
The index for trunk road links in the speed and bonus arrays. | |
literal int | PrimaryRoad = 4 |
The index for primary roads in the speed and bonus arrays. | |
literal int | PrimaryRoadLink = 5 |
The index for primary road links in the speed and bonus arrays. | |
literal int | SecondaryRoad = 6 |
The index for secondary roads in the speed and bonus arrays. | |
literal int | SecondaryRoadLink = 7 |
The index for secondary road links in the speed and bonus arrays. | |
literal int | TertiaryRoad = 8 |
The index for tertiary roads in the speed and bonus arrays. | |
literal int | UnclassifiedRoad = 9 |
The index for unclassified roads in the speed and bonus arrays. | |
literal int | ResidentialRoad = 10 |
The index for residential roads in the speed and bonus arrays. | |
literal int | Track = 11 |
The index for tracks in the speed and bonus arrays. | |
literal int | ServiceRoad = 12 |
The index for service roads in the speed and bonus arrays. | |
literal int | PedestrianRoad = 13 |
The index for pedestrian roads in the speed and bonus arrays. | |
literal int | VehicularFerry = 14 |
The index for vehicular ferries in the speed and bonus arrays. | |
literal int | PassengerFerry = 15 |
The index for passenger ferries in the speed and bonus arrays. | |
literal int | LivingStreet = 16 |
The index for living streets in the speed and bonus arrays. | |
literal int | Cycleway = 17 |
The index for cycleways in the speed and bonus arrays. | |
literal int | Path = 18 |
The index for general (mixed-used) paths in the speed and bonus arrays. | |
literal int | Footway = 19 |
The index for footways in the speed and bonus arrays. | |
literal int | Bridleway = 20 |
The index for bridleways in the speed and bonus arrays. | |
literal int | Steps = 21 |
The index for steps in the speed and bonus arrays. | |
literal int | UnknownRoadType = 22 |
The index for roads of unknown type in the speed and bonus arrays. | |
literal int | UnpavedRoad = 23 |
The index for unpaved motorable roads in the speed and bonus arrays. | |
literal int | OtherRoadType0 = 24 |
The index for other road type 0 in the speed and bonus arrays. | |
literal int | OtherRoadType1 = 25 |
The index for other road type 1 in the speed and bonus arrays. | |
literal int | OtherRoadType2 = 26 |
The index for other road type 2 in the speed and bonus arrays. | |
literal int | OtherRoadType3 = 27 |
The index for other road type 3 in the speed and bonus arrays. | |
literal int | OtherRoadType4 = 28 |
The index for other road type 4 in the speed and bonus arrays. | |
literal int | OtherRoadType5 = 29 |
The index for other road type 5 in the speed and bonus arrays. | |
literal int | OtherRoadType6 = 30 |
The index for other road type 6 in the speed and bonus arrays. | |
literal int | OtherRoadType7 = 31 |
The index for other road type 7 in the speed and bonus arrays. | |
literal int | RoadTypeCount = 32 |
The size of the speed and bonus arrays. | |
literal int | GradientUp0 = 0 |
The index for a very slight uphill gradient, or no gradient, in the gradient arrays. | |
literal int | GradientUp1 = 1 |
The index for a gentle uphill gradient in the gradient arrays. | |
literal int | GradientUp2 = 2 |
The index for a steep uphill gradient in the gradient arrays. | |
literal int | GradientUp3 = 3 |
The index for a very steep uphill gradient in the gradient arrays. | |
literal int | GradientDown0 = 4 |
The index for a very slight downhill gradient, or no gradient, in the gradient arrays. | |
literal int | GradientDown1 = 5 |
The index for a gentle downhill gradient in the gradient arrays. | |
literal int | GradientDown2 = 6 |
The index for a steep downhill gradient in the gradient arrays. | |
literal int | GradientDown3 = 7 |
The index for a very steep downhill gradient in the gradient arrays. | |
literal int | GradientCount = 8 |
The size of the gradient arrays. | |
String ^ | m_name |
The optional name of the profile. | |
int | m_vehicle_type = CarAccessFlag | WrongWayFlag |
Flags taken from WrongWayFlag ... OtherAccessFlag indicating the vehicle type. Arcs with restrictions matching any of these flags will not be taken. | |
double | m_weight |
The vehicle's weight in metric tons. Values of zero or less mean 'unknown'. | |
double | m_axle_load |
The vehicle's axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | m_double_axle_load |
The vehicle's double axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | m_triple_axle_load |
The vehicle's triple axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | m_height |
The vehicle's height in meters. Values of zero or less mean 'unknown'. | |
double | m_width |
The vehicle's width in meters. Values of zero or less mean 'unknown'. | |
double | m_length |
The vehicle's length in meters. Values of zero or less mean 'unknown'. | |
bool | m_hazmat = false |
True if the vehicle is carrying hazardous materials. | |
array< double > ^ | m_speed |
Speeds along roads in kilometres per hour. | |
array< double > ^ | m_bonus |
Bonuses or penalties in notional km per hour to be added to road types to make them more or less likely to be used. For example, a penalty of 1kph is applied to walking routes along major roads because it is pleasanter to walk along quieter minor roads. | |
array< int > ^ | m_restriction_override |
This array of bit masks allows restrictions to be overridden for certain types of road. For example, to allow routing of heavy goods vehicles along tracks, even if they are forbidden to motor vehicles, set m_restriction_override[Track] to HeavyGoodsAccessFlag. | |
int | m_turn_time |
The estimated time in seconds taken for any turn at a junction that is not a slight turn or simply going straight ahead. | |
int | m_u_turn_time |
The estimated time in seconds taken for a U-turn, defined as a turn very close to 180 degrees (within 1/32 of a circle = 11.75 degrees). | |
int | m_cross_traffic_turn_time |
The estimated time in seconds taken for a turn across the traffic: that is, a left turn in drive-on-right countries, or a right turn in drive-on-left countries. The time is used when turning from the right of way to a lower-rank road. It is doubled when turning from a lower-rank road on to the right of way. | |
int | m_traffic_light_time |
The estimated delay in seconds caused by traffic lights. | |
bool | m_shortest |
Set this flag to true to get the shortest route by distance or time, ignoring weightings. Whether distance or time is used depends on the setting of iShortestByTime. | |
bool | m_shortest_by_time |
Set this flag to true if m_shortest should produce the shortest route by time rather than distance. | |
double | m_toll_penalty |
The penalty applied to toll roads as a number between zero and one. More... | |
array< double > ^ | m_gradient_speed |
Speeds added to roads with a particular gradient. More... | |
array< double > ^ | m_gradient_bonus |
Bonuses applied to roads with a particular gradient. | |
int | m_gradient_flags |
Flags indicating which roads are affected by gradient speeds and bonuses; normally steps, etc., are excluded. Each bit is 1 shifted left by the road type. | |
A routing profile: parameters determining the type of route, including road speeds, bonuses and penalties, and vehicle type. A road type will not be used if its speed plus bonus is equal to or less than zero.
array<double> ^ CartoType::RouteProfile::m_gradient_speed |
Speeds added to roads with a particular gradient.
These values are intended for cycling, walking, hiking and running profiles, where speeds are generally the same for different types of road, but can change according to the gradient.
double CartoType::RouteProfile::m_toll_penalty |
The penalty applied to toll roads as a number between zero and one.
The value 1 means that no toll roads will be used, 0.5 makes toll roads half as desirable as non-toll roads of the same road type, and so on. The value 0 means that no penalty is applied to toll roads. Values outside the range 0...1 are clamped to that range.