Package globus.glroute
Class CostingOptions.Bicycle
java.lang.Object
globus.glroute.CostingOptions
globus.glroute.CostingOptions.Bicycle
- Enclosing class:
- CostingOptions
Options for bicycle mode
-
Nested Class Summary
Nested classes/interfaces inherited from class globus.glroute.CostingOptions
CostingOptions.Auto, CostingOptions.Bicycle, CostingOptions.Motorcycle, CostingOptions.MotorScooter, CostingOptions.Pedestrian, CostingOptions.Penalties, CostingOptions.Road, CostingOptions.Straight, CostingOptions.Truck, CostingOptions.Vehicle
-
Field Summary
Modifier and TypeFieldDescriptionfloat
This value is meant to represent how much a cyclist wants to avoid roads with poor surfaces relative to the bicycle type being used.int
The type of bicycle.float
This value is useful when bikeshare is chosen as travel mode.float
This value is useful when bikeshare is chosen as travel mode.float
Cycling speed is the average travel speed along smooth, flat roads.Penaltiesboolean
Changes the metric to quasi-shortest, i.e.float
This value indicates the willingness to take ferries.float
A cyclist's desire to tackle hills in their routes.float
This value indicates the willingness to take living streets.float
A cyclist's propensity to use roads alongside other vehicles. -
Constructor Summary
-
Method Summary
Methods inherited from class globus.glroute.CostingOptions
getJson, initFromJson
-
Field Details
-
penalties
Penalties -
bicycleType
public int bicycleTypeThe type of bicycle. Road: a road-style bicycle with narrow tires that is generally lightweight and designed for speed on paved surfaces. Hybrid or City: a bicycle made mostly for city riding or casual riding on roads and paths with good surfaces. Cross: a cyclo-cross bicycle, which is similar to a road bicycle but with wider tires suitable to rougher surfaces. Mountain: a mountain bicycle suitable for most surfaces but generally heavier and slower on paved surfaces. The default type is `GLRouteBikeType.HYBRID`. -
cyclingSpeed
public float cyclingSpeedCycling speed is the average travel speed along smooth, flat roads. This is meant to be the speed a rider can comfortably maintain over the desired distance of the route. It can be modified (in the costing method) by surface type in conjunction with bicycle type and (coming soon) by hilliness of the road section. The default speed is determined by the bicycle type and are as follows: Road = 25 KPH (15.5 MPH), Cross = 20 KPH (13 MPH), Hybrid/City = 18 KPH (11.5 MPH), Mountain = 16 KPH (10 MPH). -
useRoads
public float useRoadsA cyclist's propensity to use roads alongside other vehicles. This is a range of values from 0 to 1, where 0 attempts to avoid roads and stay on cycleways and paths, and 1 indicates the rider is more comfortable riding on roads. Based on the use_roads factor, roads with certain classifications and higher speeds are penalized in an attempt to avoid them when finding the best path. The default value is 0.5. -
useHills
public float useHillsA cyclist's desire to tackle hills in their routes. This is a range of values from 0 to 1, where 0 attempts to avoid hills and steep grades even if it means a longer (time and distance) path, while 1 indicates the rider does not fear hills and steeper grades. Based on the use_hills factor, penalties are applied to roads based on elevation change and grade. These penalties help the path avoid hilly roads in favor of flatter roads or less steep grades where available. Note that it is not always possible to find alternate paths to avoid hills (for example when route locations are in mountainous areas). The default value is 0.5. -
useFerry
public float useFerryThis value indicates the willingness to take ferries. This is a range of values between 0 and 1. Values near 0 attempt to avoid ferries and values near 1 will favor ferries. Note that sometimes ferries are required to complete a route so values of 0 are not guaranteed to avoid ferries entirely. The default value is 0.5. -
useLivingStreets
public float useLivingStreetsThis value indicates the willingness to take living streets. This is a range of values between 0 and 1. Values near 0 attempt to avoid living streets and values from 0.5 to 1 will currently have no effect on route selection. Note that sometimes living streets are required to complete a route so values of 0 are not guaranteed to avoid living streets entirely. The default value is 0.5. -
avoidBadSurfaces
public float avoidBadSurfacesThis value is meant to represent how much a cyclist wants to avoid roads with poor surfaces relative to the bicycle type being used. This is a range of values between 0 and 1. When the value is 0, there is no penalization of roads with different surface types; only bicycle speed on each surface is taken into account. As the value approaches 1, roads with poor surfaces for the bike are penalized heavier so that they are only taken if they significantly improve travel time. When the value is equal to 1, all bad surfaces are completely disallowed from routing, including start and end points. The default value is 0.25. -
bssReturnCost
public float bssReturnCostThis value is useful when bikeshare is chosen as travel mode. It is meant to give the time will be used to return a rental bike. This value will be displayed in the final directions and used to calculate the whole duation. The default value is 120 seconds. -
bssReturnPenalty
public float bssReturnPenaltyThis value is useful when bikeshare is chosen as travel mode. It is meant to describe the potential effort to return a rental bike. This value won't be displayed and used only inside of the algorithm. -
shortest
public boolean shortestChanges the metric to quasi-shortest, i.e. purely distance-based costing. Note, this will disable all other costings and penalties. Also note, shortest will not disable hierarchy pruning, leading to potentially sub-optimal routes for some costing models. The default is false.
-
-
Constructor Details
-
Bicycle
public Bicycle()
-
-
Method Details
-
write
- Throws:
IOException
-