Enum valhalla_client::Costing
source · pub enum Costing {
Auto,
Bicycle,
Bus,
Bikeshare,
Truck,
Hov,
Taxi,
MotorScooter,
Motorcycle,
Multimodal,
Pedestrian,
}
Variants§
Auto
Standard costing for driving routes by car, motorcycle, truck, and so on that obeys automobile driving rules, such as access and turn restrictions. Auto provides a short time path (though not guaranteed to be shortest time) and uses intersection costing to minimize turns and maneuvers or road name changes. Routes also tend to favor highways and higher classification roads, such as motorways and trunks.
Bicycle
Standard costing for travel by bicycle, with a slight preference for using cycleways or roads with bicycle lanes. Bicycle routes follow regular roads when needed, but avoid roads without bicycle access.
Bus
Standard costing for bus routes. Bus costing inherits the auto costing behaviors, but checks for bus access on the roads.
A combination of pedestrian and bicycle. Use bike share station(amenity:bicycle_rental) to change the travel mode
Truck
Standard costing for trucks. Truck costing inherits the auto costing behaviors, but checks for truck access, width and height restrictions, and weight limits on the roads.
Hov
DEPRECATED: use auto cost with HOV costing options.
Taxi
Standard costing for taxi routes. Taxi costing inherits the auto costing behaviors, but checks for taxi lane access on the roads and favors those roads.
MotorScooter
Standard costing for travel by motor scooter or moped. By default, motor_scooter costing will avoid higher class roads unless the country overrides allows motor scooters on these roads. Motor scooter routes follow regular roads when needed, but avoid roads without motor_scooter, moped, or mofa access.
Motorcycle
Standard costing for travel by motorcycle. This costing model provides options to tune the route to take roadways (road touring) vs. tracks and trails (adventure motorcycling).
Multimodal
Currently supports pedestrian and transit. In the future, multimodal will support a combination of all of the above.
Pedestrian
Standard walking route that excludes roads without pedestrian access. In general, pedestrian routes are shortest distance with the following exceptions: walkways and footpaths are slightly favored, while steps or stairs and alleys are slightly avoided.