here_location_services.isoline_routing_api module
This module contains classes for accessing HERE Routing API.
- class here_location_services.isoline_routing_api.IsolineRoutingApi(api_key=None, auth=None, proxies=None, country='row')[source]
Bases:
here_location_services.apis.Api
A class for accessing HERE isoline routing API.
- Parameters
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- __init__(api_key=None, auth=None, proxies=None, country='row')[source]
- Parameters
api_key (Optional[str]) –
auth (Optional[here_location_services.platform.auth.Auth]) –
proxies (Optional[dict]) –
country (str) –
- get_isoline_routing(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]
Get 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
,time
andconsumption
. 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
destination
parameter.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
origin
parameter.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]) –
PlaceOptions
optinal place options fororigin
.origin_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptions
optional waypoint options fororigin
.destination_place_options (Optional[here_location_services.config.base_config.PlaceOptions]) –
PlaceOptions
optinal place options fordestination
.destination_waypoint_options (Optional[here_location_services.config.base_config.WayPointOptions]) –
WayPointOptions
optional waypoint options fordestination
.
- Returns
requests.Response
object.- Raises
ApiError – If
status_code
of API response is not 200.- Return type
requests.models.Response