here_location_services.config.base_config module
This module defines all the base classes which will be used for configuration classes of various APIs.
- class here_location_services.config.base_config.Bunch(**kwargs)[source]
Bases:
dict
A class for dot notation implementation of dictionary.
- class here_location_services.config.base_config.RoutingMode(**kwargs)[source]
Bases:
here_location_services.config.base_config.Bunch
A Class to define constant values for Routing Modes.
fast
: Route calculation from start to destination optimized by travel time. In many cases, the route returned by the fast mode may not be the route with the fastest possible travel time. For example, the routing service may favor a route that remains on a highway, even if a faster travel time can be achieved by taking a detour or shortcut through an inconvenient side road.short
: Route calculation from start to destination disregarding any speed information. In this mode, the distance of the route is minimized, while keeping the route sensible. This includes, for example, penalizing turns. Because of that, the resulting route will not necessarily be the one with minimal distance.
- here_location_services.config.base_config.ROUTING_MODE = {'fast': 'fast', 'short': 'short'}
Use this config for routing_mode of routing API. Example: for
fast
routing_mode useROUTING_MODE.fast
.
- class here_location_services.config.base_config.ShippedHazardousGoods(**kwargs)[source]
Bases:
here_location_services.config.base_config.Bunch
A class to define the constant values for truck option
shippedHazardousGoods
.
- here_location_services.config.base_config.SHIPPED_HAZARDOUS_GOODS = {'combustible': 'combustible', 'corrosive': 'corrosive', 'explosive': 'explosive', 'flammable': 'flammable', 'gas': 'gas', 'harmfulToWater': 'harmfulToWater', 'organic': 'organic', 'other': 'other', 'poison': 'poison', 'poisonousInhalation': 'poisonousInhalation', 'radioactive': 'radioactive'}
Use this config for shipped_hazardous_goods attribute of Truck options of matrix Routing API. Example: for
explosive
shipped_hazardous_goods useSHIPPED_HAZARDOUS_GOODS.explosive
.
- class here_location_services.config.base_config.Truck(shipped_hazardous_goods=None, gross_weight=None, weight_per_axle=None, height=None, width=None, length=None, tunnel_category=None, axle_count=None, truck_type='straight', trailer_count=0)[source]
Bases:
object
A class to define different truck options which will be used during route calculation. Truck options should be used when transport_mode is
truck
.- Parameters
shipped_hazardous_goods (Optional[List]) –
gross_weight (Optional[int]) –
weight_per_axle (Optional[int]) –
height (Optional[int]) –
width (Optional[int]) –
length (Optional[int]) –
tunnel_category (Optional[str]) –
axle_count (Optional[int]) –
truck_type (str) –
trailer_count (int) –
- __init__(shipped_hazardous_goods=None, gross_weight=None, weight_per_axle=None, height=None, width=None, length=None, tunnel_category=None, axle_count=None, truck_type='straight', trailer_count=0)[source]
Object Initializer.
- Parameters
shipped_hazardous_goods (Optional[List]) – List of hazardous materials in the vehicle. valid values for hazardous materials can be used from config
SHIPPED_HAZARDOUS_GOODS
gross_weight (Optional[int]) – Total vehicle weight, including trailers and shipped goods, in kilograms. Should be greater than or equal to zero.
weight_per_axle (Optional[int]) – Vehicle weight per axle, in kilograms. Should be greater than or equal to zero.
height (Optional[int]) – Vehicle height, in centimeters. Should be in range [0, 5000]
width (Optional[int]) – Vehicle width, in centimeters. Should be in range [0, 5000]
length (Optional[int]) – Vehicle length, in centimeters. Should be in range [0, 5000]
tunnel_category (Optional[str]) – A string for category of tunnel. Valid values are “B”, “C”, “D”, “E”. Specifies the cargo tunnel restriction code. The route will pass only through tunnels of less restrictive categories.
axle_count (Optional[int]) – Total number of axles that the vehicle has. Should be in the range [2, 255].
truck_type (str) – A string to represent the type of truck.
trailer_count (int) – Number of trailers attached to the vehicle.
- class here_location_services.config.base_config.PlaceOptions(course=None, sideof_street_hint=None, match_sideof_street=None, namehint=None, radius=None, min_course_distance=None)[source]
Bases:
object
A class to define
PlaceOptions
fororigin
/via
/destination
.Various options can be found here:
- Parameters
course (Optional[int]) –
sideof_street_hint (Optional[List[float]]) –
match_sideof_street (Optional[str]) –
namehint (Optional[str]) –
radius (Optional[int]) –
min_course_distance (Optional[int]) –
- __init__(course=None, sideof_street_hint=None, match_sideof_street=None, namehint=None, radius=None, min_course_distance=None)[source]
Object Initializer.
- Parameters
course (Optional[int]) – An int representing degrees clock-wise from north. Indicating the desired direction at the place. E.g. 90 indicating
east
. This is defined in constantROUTE_COURSE
.sideof_street_hint (Optional[List[float]]) – A list of latitude and longitude.Indicating the side of the street that should be used.
match_sideof_street (Optional[str]) –
Specifies how the location set by
sideof_street_hint
should be handled. If this is set then sideof_street_hint should also be set. There are two valid values for match_sideof_street:always
: Always prefer the given side of street.onlyIfDivided
: Only prefer using side of street set bysideof_street_hint
in case the street has dividers. This is the default behavior.These values are mainted as config in:
ROUTE_MATCH_SIDEOF_STREET
namehint (Optional[str]) – A string for the router to look for the place with the most similar name. This can e.g. include things like: North being used to differentiate between interstates I66 North and I66 South, Downtown Avenue being used to correctly select a residential street.
radius (Optional[int]) – In meters Asks the router to consider all places within the given radius as potential candidates for route calculation. This can be either because it is not important which place is used, or because it is unknown. Radius more than 200 meters are not supported.
min_course_distance (Optional[int]) – In meters Asks the routing service to try to find a route that avoids actions for the indicated distance. E.g. if the origin is determined by a moving vehicle, the user might not have time to react to early actions.
- class here_location_services.config.base_config.WayPointOptions(stop_duration=None, pass_through=None)[source]
Bases:
object
A class to define
PlaceOptions
forvia
/destination
.Various options can be found here:
- Parameters
stop_duration (Optional[int]) –
pass_through (Optional[bool]) –