CartoType .NET API 8.8-7-gb35e4dc71
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. | |
Public Attributes | |
array< double > ^ | Speed |
Speeds along roads in kilometres per hour. | |
array< double > ^ | 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 > ^ | RestrictionOverride |
This array of bit masks allows restrictions to be overridden for certain types of road. | |
array< double > ^ | GradientSpeed |
Speeds added to roads with a particular gradient. More... | |
array< double > ^ | GradientBonus |
Bonuses applied to roads with a particular gradient. | |
Properties | |
String^ | XmlString [get] |
Creates an XML string representing the route profile. | |
String^ | Name |
The optional name of the profile. | |
int | VehicleType |
Flags taken from the access flags defined in FeatureInfo indicating the vehicle type. Arcs with restrictions matching any of these flags will not be taken. | |
double | Weight |
The vehicle's weight in metric tons. Values of zero or less mean 'unknown'. | |
double | AxleLoad |
The vehicle's axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | DoubleAxleLoad |
The vehicle's double axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | TripleAxleLoad |
The vehicle's triple axle load in metric tons. Values of zero or less mean 'unknown'. | |
double | Height |
The vehicle's height in meters. Values of zero or less mean 'unknown'. | |
double | Width |
The vehicle's width in meters. Values of zero or less mean 'unknown'. | |
double | Length |
The vehicle's length in meters. Values of zero or less mean 'unknown'. | |
bool | HazMat |
True if the vehicle is carrying hazardous materials. | |
int | TurnTime |
The estimated time in seconds taken for any turn at a junction that is not a slight turn or simply going straight ahead. | |
int | UTurnTime |
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 | CrossTrafficTurnTime |
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 | TrafficLightTime |
The estimated delay in seconds caused by traffic lights. | |
bool | 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 ShortestByTime. | |
bool | ShortestByTime |
Set this flag to true if Shortest should produce the shortest route by time rather than distance. | |
double | TollPenalty |
The penalty applied to toll roads as a number between zero and one. More... | |
int | GradientFlags |
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::GradientSpeed |
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::TollPenalty |
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.