Class CostingOptions.Road

java.lang.Object
globus.glroute.CostingOptions
globus.glroute.CostingOptions.Road
Enclosing class:
CostingOptions

public static class CostingOptions.Road extends CostingOptions
General options when driving on road
  • Field Details

    • penalties

      public CostingOptions.Penalties penalties
      Penalties
    • privateAccessPenalty

      public float privateAccessPenalty
      A penalty applied when a gate or bollard with access=private is encountered. The default private access penalty is 450 seconds.
    • tollBoothCost

      public float tollBoothCost
      A cost applied when a toll booth is encountered. This cost is added to the estimated and elapsed times. The default cost is 15 seconds.
    • tollBoothPenalty

      public float tollBoothPenalty
      A penalty applied to the cost when a toll booth is encountered. This penalty can be used to create paths that avoid toll roads. The default toll booth penalty is 0.
    • ferryCost

      public float ferryCost
      A cost applied when entering a ferry. This cost is added to the estimated and elapsed times. The default cost is 300 seconds (5 minutes).
    • useFerry

      public float useFerry
      This 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.
    • useHighways

      public float useHighways
      This value indicates the willingness to take highways. This is a range of values between 0 and 1. Values near 0 attempt to avoid highways and values near 1 will favor highways. Note that sometimes highways are required to complete a route so values of 0 are not guaranteed to avoid highways entirely. The default value is 1.0.
    • useTolls

      public float useTolls
      This value indicates the willingness to take roads with tolls. This is a range of values between 0 and 1. Values near 0 attempt to avoid tolls and values near 1 will not attempt to avoid them. Note that sometimes roads with tolls are required to complete a route so values of 0 are not guaranteed to avoid them entirely. The default value is 0.5.
    • useLivingStreets

      public float useLivingStreets
      This 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 near 1 will favor living streets. 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 for trucks, 0.1 for cars, buses, motor scooters and motorcycles.
    • useTracks

      public float useTracks
      This value indicates the willingness to take track roads. This is a range of values between 0 and 1. Values near 0 attempt to avoid tracks and values near 1 will favor tracks a little bit. Note that sometimes tracks are required to complete a route so values of 0 are not guaranteed to avoid tracks entirely. The default value is 0 for autos, 0.5 for motor scooters and motorcycles.
    • serviceFactor

      public float serviceFactor
      A factor that modifies (multiplies) the cost when generic service roads are encountered. The default service_factor is 1.
    • shortest

      public boolean shortest
      Changes 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.
    • topSpeed

      public float topSpeed
      Top speed the vehicle can go. Also used to avoid roads with higher speeds than this value. top_speed must be between 10 and 252 KPH. The default value is 140 KPH.
    • fixedSpeed

      public float fixedSpeed
      Fixed speed the vehicle can go. Used to override the calculated speed. Can be useful if speed of vehicle is known. fixed_speed must be between 1 and 252 KPH. The default value is 0 KPH which disables fixed speed and falls back to the standard calculated speed based on the road attribution.
    • ignoreClosures

      public boolean ignoreClosures
      If set to true, ignores all closures, marked due to live traffic closures, during routing. Note: This option cannot be set if location.search_filter.exclude_closures is also specified in the request and will return an error if it is
    • closureFactor

      public float closureFactor
      A factor that penalizes the cost when traversing a closed edge (eg: if search_filter.exclude_closures is false for origin and/or destination location and the route starts/ends on closed edges). Its value can range from 1.0 - don't penalize closed edges, to 10.0 - apply high cost penalty to closed edges. Note: This factor is applicable only for motorized modes of transport, i.e auto, motorcycle, motor_scooter, bus, truck and taxi. Default value is 9.0.
  • Constructor Details

    • Road

      public Road()