pub enum Costing {
Auto(AutoCostingOptions),
Bicycle(BicycleCostingOptions),
Bus(AutoCostingOptions),
Bikeshare(BicycleCostingOptions),
Truck(TruckCostingOptions),
Taxi(AutoCostingOptions),
MotorScooter(MotorScooterCostingOptions),
Motorcycle(MotorcycleCostingOptions),
Multimodal(MultimodalCostingOptions),
Pedestrian(PedestrianCostingOptions),
}
Expand description
Costing options for different travel modes.
Variants§
Auto(AutoCostingOptions)
Standard costing for driving routes by car, motorcycle, truck, and so on.
Obeys automobile driving rules, such as access and turn restrictions. This provides a short time path (though not guaranteed to be the 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(BicycleCostingOptions)
Standard costing for travel by bicycle.
Has 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(AutoCostingOptions)
Standard costing for bus routes.
Bus costing inherits the Costing::Auto
behaviors, but checks for bus access on the roads.
A combination of pedestrian and bicycle.
Use bike share station (indicated by amenity:bicycle_rental
) to change the travel mode
Truck(TruckCostingOptions)
Standard costing for trucks.
Truck costing inherits the Costing::Auto
behaviors, but checks for:
- truck access,
- width/height restrictions and
- weight limits
Taxi(AutoCostingOptions)
Standard costing for taxi routes.
Taxi costing inherits the Costing::Auto
behaviors, but checks and favors
taxi lane access on roads.
MotorScooter(MotorScooterCostingOptions)
Standard costing for travel by motor scooter or moped.
By default, this 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(MotorcycleCostingOptions)
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(MultimodalCostingOptions)
Combines different modalities.
Currently supports pedestrian and transit. In the future, multimodal will support a combination of all of the above.
Pedestrian(PedestrianCostingOptions)
Standard walking route that excludes roads without pedestrian access.
In general, pedestrian routes are the shortest distance with the following exceptions:
- walkways and footpaths are slightly favored and
- steps or stairs and alleys are slightly avoided