here_location_services.ls module
This module contains class to interact with Location services REST APIs.
- class here_location_services.ls.LS(api_key=None, platform_credentials=None, proxies=None, country='row')[source]
Bases:
objectA single interface for the user to interact with rest of the Location services APIs.
- Parameters
api_key (Optional[str]) –
platform_credentials (Optional[here_location_services.platform.credentials.PlatformCredentials]) –
proxies (Optional[dict]) –
country (str) –
- __init__(api_key=None, platform_credentials=None, proxies=None, country='row')[source]
- Parameters
api_key (Optional[str]) –
platform_credentials (Optional[here_location_services.platform.credentials.PlatformCredentials]) –
proxies (Optional[dict]) –
country (str) –
- geocode(query, limit=20, lang='en-US')[source]
Calculate coordinates as result of geocoding for the given
query.- Parameters
query (str) – A string containing the input query.
limit (int) – An int representing maximum number of results to be returned. Default value is 20.
lang (str) – A string to represent language to be used for result rendering from a list of BCP47 compliant Language Codes.
- Raises
ValueError – If
queryis empty or having all whitespace characters.- Returns
GeocoderResponseobject.- Return type
- reverse_geocode(lat, lng, limit=1, lang='en-US')[source]
Return the address label string as the result of reverse-geocoding the given
latitudeandlongitude.- Parameters
lat (float) – A float representing latitude of point.
lng (float) – A float representing longitude of point.
limit (int) – An int representing maximum number of results to be returned. Default value is 1.
lang (str) – A string to represent language to be used for result rendering from a list of BCP47 compliant Language Codes.
- Raises
ValueError – If Latitude is not in range between -90 and 90 or Longitude is not in range between -180 and 180.
- Returns
ReverseGeocoderResponseobject.- Return type
- calculate_isoline(range, range_type, transport_mode, origin=None, departure_time=None, destination=None, arrival_time=None, routing_mode='fast', shape_max_points=None, optimised_for='balanced', avoid_features=None, truck=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None)[source]
Calculate isoline routing.
Request a polyline that connects the endpoints of all routes leaving from one defined center with either a specified length or specified travel time.
- Parameters
range (str) – A string representing a range of isoline, unit is defined by parameter range type. Example: range=’1000’ or range=’1000,2000,3000’
range_type (str) – A string representing a type of
range. Possible values aredistance,timeandconsumption. For distance the unit meters. For a time the unit is seconds. For consumption, it is defined by the consumption model.transport_mode (str) – A string representing Mode of transport to be used for the calculation of the isolines. Example:
car.origin (Optional[List]) – Center of the isoline request. The Isoline(s) will cover the region which can be reached from this point within given range. It cannot be used in combination with
destinationparameter.departure_time (Optional[datetime.datetime]) – Specifies the time of departure as defined by either date-time or full-date partial-time in RFC 3339, section 5.6 (for example, 2019-06-24T01:23:45). The requested time is converted to the local time at origin. When the optional timezone offset is not specified, time is assumed to be local. If neither departure_time or arrival_time are specified, current time at departure location will be used. All Time values in the response are returned in the timezone of each location.
destination (Optional[List]) – Center of the isoline request. The Isoline(s) will cover the region within the specified range that can reach this point. It cannot be used in combination with
originparameter.arrival_time (Optional[datetime.datetime]) – Specifies the time of arrival as defined by either date-time or full-date T partial-time in RFC 3339, section 5.6 (for example, 2019-06-24T01:23:45). The requested time is converted to the local time at destination. When the optional timezone offset is not specified, time is assumed to be local. All Time values in the response are returned in the timezone of each location.
routing_mode (Optional[str]) – A string to represent routing mode.
shape_max_points (Optional[int]) – An integer to Limit the number of points in the resulting isoline geometry. If the isoline consists of multiple components, the sum of points from all components is considered. This parameter doesn’t affect performance.
optimised_for (Optional[str]) – A string to specify how isoline calculation is optimized.
avoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in :attr: AVOID_FEATURES <here_location_services.config.isoline_routing_config.AVOID_FEATURES>
truck (Optional[here_location_services.config.base_config.Truck]) – Different truck options to use during route calculation when transport_mode = truck. use object of
Truck here_location_services.config.base_config.Truck>origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.
- Raises
ValueError – If
originanddestinationare provided together.- Returns
IsolineResponseobject.- Return type
- autosuggest(query, at=None, search_in_circle=None, search_in_bbox=None, in_country=None, limit=20, terms_limit=None, lang=None, political_view=None, show=None)[source]
Suggest address or place candidates based on an incomplete or misspelled query
- Parameters
query (str) – A string for free-text query. Example: res, rest
at (Optional[List]) – Specify the center of the search context expressed as list of coordinates One of at, search_in_circle or search_in_bbox is required. Parameters “at”, “search_in_circle” and “search_in_bbox” are mutually exclusive. Only one of them is allowed.
search_in_circle (Optional[here_location_services.config.autosuggest_config.SearchCircle]) – Search within a circular geographic area provided as latitude, longitude, and radius (in meters)
search_in_bbox (Optional[Tuple]) – Search within a rectangular bounding box geographic area provided as tuple of west longitude, south latitude, east longitude, north latitude
in_country (Optional[List[str]]) – Search within a specific or multiple countries provided as comma-separated ISO 3166-1 alpha-3 country codes. The country codes are to be provided in all uppercase. Must be accompanied by exactly one of at, search_in_circle or search_in_bbox.
limit (Optional[int]) – An integer specifiying maximum number of results to be returned.
terms_limit (Optional[int]) – An integer specifiying maximum number of Query Terms Suggestions to be returned.
lang (Optional[List[str]]) – List of strings to select the language to be used for result rendering from a list of BCP 47 compliant language codes.
political_view (Optional[str]) – Toggle the political view.
show (Optional[List[str]]) – Select additional fields to be rendered in the response. Please note that some of the fields involve additional webservice calls and can increase the overall response time.
- Returns
requests.Responseobject.- Raises
ValueError – If
search_in_circle,``search_in_bbox`` anddestinationare provided together.- Return type
- get_dest_weather(products, at=None, query=None, zipcode=None, hourly_date=None, one_observation=None, language=None, units=None)[source]
- Retrieves weather reports, weather forecasts, severe weather alerts
and moon and sun rise and set information.
- Parameters
products (List[str]) – List of
DestWeatherProductidentifying the type of report to obtain.at (Optional[List]) – A list of
latitudeandlongitudespecifying the area covered by the weather report.query (Optional[str]) – Free text query. Examples: “125, Berliner, berlin”, “Beacon, Boston”
zipcode (Optional[str]) – ZIP code of the location. This parameter is supported only for locations in the United States of America.
hourly_date (Optional[Union[datetime.date, datetime.datetime]]) – Date for which hourly forecasts are to be retrieved. Can be either a date or datetime object
one_observation (Optional[bool]) – Boolean, if set to true, the response only includes the closest location. Only available when the product parameter is set to DEST_WEATHER_PRODUCT.observation.
language (Optional[str]) – Defines the language used in the descriptions in the response.
units (Optional[str]) – Defines whether units or imperial units are used in the response.
- Raises
ValueError – If neither at, query or zipcode are passed.
ValueError – If one_observation is set to true without passing DEST_WEATHER_PRODUCT.observation in products
- Returns
DestinationWeatherResponseobject.- Return type
- get_weather_alerts(geometry, start_time, id=None, weather_severity=None, weather_type=None, country=None, end_time=None, width=None)[source]
- Retrieves weather reports, weather forecasts, severe weather alerts
and moon and sun rise and set information.
- Parameters
geometry (Union[geojson.geometry.Point, geojson.geometry.LineString]) – Point or LineString defining the route or a single location
start_time (datetime.datetime) – Start time of the event
id (Optional[str]) – Unique weather alert id.
weather_severity (Optional[int]) – Defines the severity of the weather event as defined in
WeatherSeverity.weather_type (Optional[str]) – Defines the type of the weather event as defined in
WeatherType.country (Optional[str]) – String for ISO-3166-1 2-letter country code.
end_time (Optional[datetime.datetime]) – End time of the event. If not present, warning is valid until it is not removed from the feed by national weather institutes (valid until warning is present in the response)
width (Optional[int]) – int
- Raises
ValueError – If maximum width exceeds 100000 for point type geometry or width exceeds 25000 for LineString geometry
- Returns
WeatherAlertsResponseobject.- Return type
- solve_tour_planning(fleet, plan, id=None, optimization_traffic=None, optimization_waiting_time=None, is_async=False)[source]
Requests profile-aware routing data, creates a Vehicle Routing Problem and solves it.
- Parameters
fleet (here_location_services.config.tour_planning_config.Fleet) – A fleet represented by various vehicle types for serving jobs.
plan (here_location_services.config.tour_planning_config.Plan) – Represents the list of jobs to be served.
id (Optional[str]) – A unique identifier of an entity. Avoid referencing any confidential or personal information as part of the Id.
optimization_traffic (Optional[str]) – “liveOrHistorical” “historicalOnly” “automatic” Specifies what kind of traffic information should be considered for routing
optimization_waiting_time (Optional[Dict]) – Configures departure time optimization which tries to adapt the starting time of the tour in order to reduce waiting time as a consequence of a vehicle arriving at a stop before the starting time of the time window defined for serving the job.
is_async (Optional[bool]) – Solves the problem Asynchronously
- Raises
ApiError – If
- Returns
TourPlanningResponseobject.- Return type
- discover(query, center=None, radius=None, country_codes=None, bounding_box=None, limit=None, lang=None)[source]
Search places using Location Services discover endpoint.
This method uses location services
discoverendpoint to search places based on query which is free-form text. There are three different combination of inputs as shown below to search places using discover:centerandcountry_codecenterandradiusbounding_box
- Parameters
query (str) – A string representing free-text query to search places.
center (Optional[List[float]]) – A list of latitude and longitude representing the center for search query.
radius (Optional[int]) – A radius in meters along with center for searching places.
country_codes (Optional[List]) – A list of ISO 3166-1 alpha-3 country codes.
bounding_box (Optional[List[float]]) – A bounding box, provided as west longitude, south latitude, east longitude, north latitude.
limit (Optional[int]) – An int representing maximum number of results to be returned.
lang (Optional[str]) – A string to represent language to be used for result rendering from a list of BCP47 compliant Language Codes.
- Raises
ValueError – If
centerandbounding_boxare provided together.- Returns
DiscoverResponseobject.- Return type
- browse(center, radius=None, country_codes=None, bounding_box=None, categories=None, limit=None, name=None, lang=None)[source]
Get search results for places based on different filters such as categories or name.
- Parameters
center (List) – A list of latitude and longitude representing the center for search query.
radius (Optional[int]) – A radius in meters along with center for searching places.
country_codes (Optional[List]) – A list of ISO 3166-1 alpha-3 country codes.
bounding_box (Optional[List[float]]) – A bounding box, provided as west longitude, south latitude, east longitude, north latitude.
categories (Optional[List]) – A list strings of category-ids.
limit (Optional[int]) – An int representing maximum number of results to be returned.
name (Optional[str]) – A string representing Full-text filter on POI names/titles.
lang (Optional[str]) – A string to represent language to be used for result rendering from a list of BCP47 compliant Language Codes.
- Returns
BrowseResponseobject.- Return type
- lookup(location_id, lang=None)[source]
Get search results by providing
location_id.- Parameters
location_id (str) – A string representing id.
lang (Optional[str]) – A string to represent language to be used for result rendering from a list of BCP47 compliant Language Codes.
- Returns
LookupResponseobject.- Return type
- car_route(origin, destination, via=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None, departure_time=None, routing_mode='fast', alternatives=0, units='metric', lang='en-US', return_results=None, spans=None, avoid_features=None, avoid_areas=None, exclude=None)[source]
Calculate
carroute between two endpoints.- Parameters
origin (List) – A list of
latitudeandlongitudeof origin point of route.destination (List) – A list of
latitudeandlongitudeof destination point of route.via (Optional[List[here_location_services.config.routing_config.Via]]) – A list of
Viaobjects.origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.departure_time (Optional[datetime.datetime]) –
datetime.datetimeobject.routing_mode (str) – A string to represent routing mode. use config defined in
ROUTING_MODEalternatives (int) – Number of alternative routes to return aside from the optimal route. default value is
0and maximum is6.units (str) – A string representing units of measurement used in guidance instructions. The default is metric.
lang (str) – A string representing preferred language of the response. The value should comply with the IETF BCP 47.
return_results (Optional[List]) – A list of strings.
spans (Optional[List]) – A list of strings to define which attributes are included in the response spans. use config defined in
ROUTING_SPANSavoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area.
exclude (Optional[List[str]]) – A comma separated list of three-letter country codes (ISO-3166-1 alpha-3 code) that routes will exclude.
- Returns
RoutingResponseobject.- Return type
- bicycle_route(origin, destination, via=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None, departure_time=None, routing_mode='fast', alternatives=0, units='metric', lang='en-US', return_results=None, spans=None, avoid_features=None, avoid_areas=None, exclude=None)[source]
Calculate
bicycleroute between two endpoints.- Parameters
origin (List) – A list of
latitudeandlongitudeof origin point of route.destination (List) – A list of
latitudeandlongitudeof destination point of route.via (Optional[List[here_location_services.config.routing_config.Via]]) – A list of
Viaobjects.origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.departure_time (Optional[datetime.datetime]) –
datetime.datetimeobject.routing_mode (str) – A string to represent routing mode.
alternatives (int) – Number of alternative routes to return aside from the optimal route. default value is
0and maximum is6.units (str) – A string representing units of measurement used in guidance instructions. The default is metric.
lang (str) – A string representing preferred language of the response. The value should comply with the IETF BCP 47.
return_results (Optional[List]) – A list of strings.
spans (Optional[List]) – A list of strings to define which attributes are included in the response spans.
avoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area.
exclude (Optional[List[str]]) – A comma separated list of three-letter country codes (ISO-3166-1 alpha-3 code) that routes will exclude.
- Returns
RoutingResponseobject.- Return type
- truck_route(origin, destination, via=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None, departure_time=None, routing_mode='fast', alternatives=0, units='metric', lang='en-US', return_results=None, spans=None, truck=None, avoid_features=None, avoid_areas=None, exclude=None)[source]
Calculate
truckroute between two endpoints.- Parameters
origin (List) – A list of
latitudeandlongitudeof origin point of route.destination (List) – A list of
latitudeandlongitudeof destination point of route.via (Optional[List[here_location_services.config.routing_config.Via]]) – A list of
Viaobjects.origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.departure_time (Optional[datetime.datetime]) –
datetime.datetimeobject.routing_mode (str) – A string to represent routing mode.
alternatives (int) – Number of alternative routes to return aside from the optimal route. default value is
0and maximum is6.units (str) – A string representing units of measurement used in guidance instructions. The default is metric.
lang (str) – A string representing preferred language of the response. The value should comply with the IETF BCP 47.
return_results (Optional[List]) – A list of strings.
spans (Optional[List]) – A list of strings to define which attributes are included in the response spans.
truck (Optional[here_location_services.config.base_config.Truck]) – Different truck options to use during route calculation. use object of
Truck here_location_services.config.matrix_routing_config.Truck>avoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area.
exclude (Optional[List[str]]) – A comma separated list of three-letter country codes (ISO-3166-1 alpha-3 code) that routes will exclude.
- Returns
RoutingResponseobject.- Return type
- scooter_route(origin, destination, via=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None, scooter=None, departure_time=None, routing_mode='fast', alternatives=0, units='metric', lang='en-US', return_results=None, spans=None, avoid_features=None, avoid_areas=None, exclude=None)[source]
Calculate
scooterroute between two endpoints.- Parameters
origin (List) – A list of
latitudeandlongitudeof origin point of route.destination (List) – A list of
latitudeandlongitudeof destination point of route.via (Optional[List[here_location_services.config.routing_config.Via]]) – A list of
Viaobjects.origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.scooter (Optional[here_location_services.config.routing_config.Scooter]) – Additional attributes for scooter route.
departure_time (Optional[datetime.datetime]) –
datetime.datetimeobject.routing_mode (str) – A string to represent routing mode.
alternatives (int) – Number of alternative routes to return aside from the optimal route. default value is
0and maximum is6.units (str) – A string representing units of measurement used in guidance instructions. The default is metric.
lang (str) – A string representing preferred language of the response. The value should comply with the IETF BCP 47.
return_results (Optional[List]) – A list of strings.
spans (Optional[List]) – A list of strings to define which attributes are included in the response spans.
avoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area.
exclude (Optional[List[str]]) – A comma separated list of three-letter country codes (ISO-3166-1 alpha-3 code) that routes will exclude.
- Returns
RoutingResponseobject.- Return type
- pedestrian_route(origin, destination, via=None, origin_place_options=None, origin_waypoint_options=None, destination_place_options=None, destination_waypoint_options=None, departure_time=None, routing_mode='fast', alternatives=0, units='metric', lang='en-US', return_results=None, spans=None, avoid_features=None, avoid_areas=None, exclude=None)[source]
Calculate
pedestrianroute between two endpoints.- Parameters
origin (List) – A list of
latitudeandlongitudeof origin point of route.destination (List) – A list of
latitudeandlongitudeof destination point of route.via (Optional[List[here_location_services.config.routing_config.Via]]) – A list of
Viaobjects.origin_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fororigin.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fororigin.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptionsoptinal place options fordestination.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptionsoptional waypoint options fordestination.departure_time (Optional[datetime.datetime]) –
datetime.datetimeobject.routing_mode (str) – A string to represent routing mode.
alternatives (int) – Number of alternative routes to return aside from the optimal route. default value is
0and maximum is6.units (str) – A string representing units of measurement used in guidance instructions. The default is metric.
lang (str) – A string representing preferred language of the response. The value should comply with the IETF BCP 47.
return_results (Optional[List]) – A list of strings.
spans (Optional[List]) – A list of strings to define which attributes are included in the response spans.
avoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area.
exclude (Optional[List[str]]) – A comma separated list of three-letter country codes (ISO-3166-1 alpha-3 code) that routes will exclude.
- Returns
RoutingResponseobject.- Return type
- matrix(origins, region_definition, async_req=False, destinations=None, profile=None, departure_time=None, routing_mode=None, transport_mode=None, avoid_features=None, avoid_areas=None, truck=None, matrix_attributes=None)[source]
Calculate routing matrix between multiple
originsanddestinationsusing synchronous and asynchronous requests.A routing matrix is a matrix with rows labeled by origins and columns by destinations. Each entry of the matrix is travel time or distance from the origin to the destination. The response contains 2 optional flat arrays
TravelTimesanddistancesdepending upon the specifiedmatrix_attributes. Each array represents a 2D matrix where rows (i) corresponds tooriginsand columns (j) to destinations. The kth position in the array corresponds to the (i, j) position in the matrix defined by the following relationship: k = num_destitions * i + j.- Parameters
origins (List[Dict]) – A list of dictionaries containing lat and long for origin points.
region_definition (Union[here_location_services.config.matrix_routing_config.CircleRegion, here_location_services.config.matrix_routing_config.BoundingBoxRegion, here_location_services.config.matrix_routing_config.PolygonRegion, here_location_services.config.matrix_routing_config.AutoCircleRegion, here_location_services.config.matrix_routing_config.WorldRegion]) –
Definition of a region in which the matrix will be calculated. Use object of atleast one of the following regions:
async_req (bool) – If set to True reuqests will be sent to asynchronous matrix routing API else It will be sent to synchronous matrix routing API. For larger matrices, or longer routes, or routes in denser road networks, it is recommended to set to True.
destinations (Optional[List[Dict]]) – A list of dictionaries containing lat and long for destination points. When no destinations are specified the matrix is assumed to be quadratic with origins used as destinations.
profile (Optional[str]) – A string to represent profile id. A set predefined profile ids for route calculation can be used from config
PROFILEdeparture_time (Optional[Union[datetime.datetime, str]]) –
datetime.datetimeobject with explicit timezone. When departure_time is not specified, it is implicitly assumed to be the current time. The special valueanyenforces non time-aware routing.routing_mode (Optional[str]) – A string to represent routing mode. Routing mode values are defined in
ROUTING_MODEtransport_mode (Optional[str]) – A string to represent transport mode. Transport modes are defined in
ROUTING_TRANSPORT_MODEavoid_features (Optional[List[str]]) – Avoid routes that violate these properties. Avoid features are defined in
AVOID_FEATURESavoid_areas (Optional[List[here_location_services.config.matrix_routing_config.AvoidBoundingBox]]) – A list of areas to avoid during route calculation. To define avoid area use object of
AvoidBoundingBoxtruck (Optional[here_location_services.config.base_config.Truck]) – Different truck options to use during route calculation when transport_mode = truck. use object of
Truckmatrix_attributes (Optional[List[str]]) – Defines which attributes are included in the response as part of the data representation of the matrix entries summaries. Matrix attributes are defined in
MATRIX_ATTRIBUTES
- Raises
ValueError – If conflicting options are provided.
ApiError – If API response status code is not as expected.
- Returns
MatrixRoutingResponseobject.- Return type