here_location_services.config.routing_config module
This module defines all the configs which will be required as inputs to routing APIs.
- class here_location_services.config.routing_config.RoutingReturn(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant attributes which are included in routing API’s response as part of the data representation of route or section.
polyline- Polyline for the route in Flexible Polyline Encoding. Either a 2D polyline (without elevation specified) or a 3D polyline with the 3rd dimension type Elevation (with elevation specified).actions- Actions (such as maneuvers or tasks) that must be taken to complete the section.instructions - Include instructions in returned actions. Instructions are localized to the requested language.
summary- Include a summary for the section.travelSummary- Include a summary for the travel portion of the section.turnByTurnActions- Include all information necessary to support turn by turn guidance to complete the section.mlDuration- Use a region-specific machine learning model to calculate route duration. Disclaimer: This parameter is currently in beta release, and is therefore subject to breaking changes.elevation- Include elevation information in coordinate and geometry types. See e.g. polyline or location.routeHandle- Encode calculated route and return a handle which can be used with routes/{routeHandle} to decode the route at a later point in time.incidents- Include a list of all incidents applicable to each section.
Following restrictions apply when specifying return parameter:
If
actionsis requested, thenpolylinemust also be requested as well.If
instructionsis requested, thenactionsmust also be requested as well.If
turnByTurnActionsis requested, thenpolylinemust also be requested as well.If at least one attribute is requested within the
spansparameter, thenpolylinemust be requested as well.
- here_location_services.config.routing_config.ROUTING_RETURN = {'actions': 'actions', 'elevation': 'elevation', 'incidents': 'incidents', 'instructions': 'instructions', 'mlDuration': 'mlDuration', 'passthrough': 'passthrough', 'polyline': 'polyline', 'routeHandle': 'routeHandle', 'summary': 'summary', 'travelSummary': 'travelSummary', 'turnByTurnActions': 'turnByTurnActions'}
Use this config for return attributes from routing API for param
return_results. Example: To return polyline in results useROUTING_RETURN.polyline.
- class here_location_services.config.routing_config.RoutingSpans(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant attributes which are included in the response spans.
walkAttributesstreetAttributescarAttributestruckAttributesscooterAttributesnameslengthdurationbaseDurationcountryCodefunctionalClassrouteNumbersspeedLimitmaxSpeeddynamicSpeedInfosegmentIdsegmentRefconsumption.
- here_location_services.config.routing_config.ROUTING_SPANS = {'baseDuration': 'baseDuration', 'carAttributes': 'streetAttributes', 'consumption': 'consumption', 'countryCode': 'countryCode', 'duration': 'duration', 'dynamicSpeedInfo': 'dynamicSpeedInfo', 'functionalClass': 'functionalClass', 'length': 'length', 'maxSpeed': 'maxSpeed', 'names': 'names', 'routeNumbers': 'routeNumbers', 'scooterAttributes': 'scooterAttributes', 'segmentId': 'segmentId', 'segmentRef': 'segmentRef', 'speedLimit': 'speedLimit', 'streetAttributes': 'streetAttributes', 'truckAttributes': 'truckAttributes', 'walkAttributes': 'walkAttributes'}
Use this config for spans of routing API. Example: for
walkAttributesrouting_mode useROUTING_SPANS.walkAttributes.
- class here_location_services.config.routing_config.RoutingTransportMode(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant attributes for mode of transport to be used for the calculation of the route.
cartruckpedestrianbicyclescooter
- here_location_services.config.routing_config.ROUTING_TRANSPORT_MODE = {'bicycle': 'bicycle', 'car': 'car', 'pedestrian': 'pedestrian', 'scooter': 'scooter', 'truck': 'truck'}
Use this config for transport_mode of routing API. Example: for
cartransport_mode useROUTING_TRANSPORT_MODE.car.
- class here_location_services.config.routing_config.RouteCourse(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant attributes for Course option.
- class here_location_services.config.routing_config.RouteMatchSideOfStreet(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant attribuites for
matchSideOfStreet.
- here_location_services.config.routing_config.ROUTE_MATCH_SIDEOF_STREET = {'always': 'always', 'onlyIfDivided': 'onlyIfDivided'}
Use this config for transport_mode of routing API. Example: for
cartransport_mode useROUTING_TRANSPORT_MODE.car.
- class here_location_services.config.routing_config.AvoidFeatures(**kwargs)[source]
Bases:
here_location_services.config.base_config.BunchA class to define constant values for features to avoid during route calculation.
- here_location_services.config.routing_config.AVOID_FEATURES = {'carShuttleTrain': 'carShuttleTrain', 'controlledAccessHighway': 'controlledAccessHighway', 'difficultTurns': 'difficultTurns', 'dirtRoad': 'dirtRoad', 'ferry': 'ferry', 'seasonalClosure': 'seasonalClosure', 'tollRoad': 'tollRoad', 'tunnel': 'tunnel'}
Use this config for match_sideof_street for PlaceOptions. Example: for match_sideof_street
alwaysuseROUTE_MATCH_SIDEOF_STREET.always.
- class here_location_services.config.routing_config.Scooter(allow_highway)[source]
Bases:
objectA class to define attributes specific for the scooter route.
Scooter specific parameters:
allowHighway: Specifies whether the scooter is allowed on the highway or not. This parameter is optional. If not provided, then by default scooter is not allowed to use highway. There is a similar parameter
avoid[features]=controlledAccessHighwayto disallow highway usage. avoid[features] takes precedence so if this parameter is also used then scooters are not allowed to use highways even if allowHighway is used with value as true. Possible values: true: scooter is allowed to use the highway. false: scooter is not allowed to use the highway.- Parameters
allow_highway (bool) –
- class here_location_services.config.routing_config.Via(lat, lng, place_options=None, waypoint_options=None)[source]
Bases:
objectA class to define
viawaypoint.A via waypoint is a location between origin and destination. The route will do a stop at the via waypoint.
- Parameters
lat (float) –
lng (float) –
place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
- __init__(lat, lng, place_options=None, waypoint_options=None)[source]
- Parameters
lat (float) –
lng (float) –
place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –