This repository has been archived by the owner on Sep 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from jain-aayush1123/isoline-routing-version-bump
migrate isoline routing api from v7 to v8
- Loading branch information
Showing
13 changed files
with
649 additions
and
325 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
docs/source/here_location_services.config.isoline_routing_config.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
here\_location\_services.config.isoline\_routing\_config module | ||
=============================================================== | ||
|
||
.. automodule:: here_location_services.config.isoline_routing_config | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: | ||
:private-members: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
# Copyright (C) 2019-2021 HERE Europe B.V. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
"""This module defines all the configs which will be required as inputs to Isoline routing API.""" | ||
|
||
from .base_config import Bunch | ||
|
||
|
||
class IsolineRoutingTransportMode(Bunch): | ||
"""A class to define constant attributes for mode of transport to be used for the | ||
calculation of the route. | ||
* ``car`` | ||
* ``truck`` | ||
* ``pedestrian`` | ||
""" | ||
|
||
|
||
transport_mode = { | ||
"car": "car", | ||
"truck": "truck", | ||
"pedestrian": "pedestrian", | ||
} | ||
|
||
#: Use this config for transport_mode of isoline routing API. | ||
#: Example: for ``car`` transport_mode use ``ISOLINE_ROUTING_TRANSPORT_MODE.car``. | ||
ISOLINE_ROUTING_TRANSPORT_MODE = IsolineRoutingTransportMode(**transport_mode) | ||
|
||
|
||
class RangeType(Bunch): | ||
"""A Class to define constant values for specifying the type of range for Isoline Routings Api | ||
``distance``: | ||
Units in meters | ||
``time``: | ||
Units in seconds | ||
``consumption``: | ||
Units in Wh | ||
""" | ||
|
||
|
||
#: Use this config s optimised_for of isoline routing API. | ||
#: Example: for optimising for ``balanced`` mode use ``OPTIMISED_FOR.balanced``. | ||
RANGE_TYPE = RangeType(**{"distance": "distance", "time": "time", "consumption": "consumption"}) | ||
|
||
|
||
class OptimisedFor(Bunch): | ||
"""A Class to define constant values for optimising calculation for Isoline Routings Api | ||
``quality``: | ||
Calculation of isoline focuses on quality, that is, the graph used for isoline calculation | ||
has higher granularity generating an isoline that is more precise. | ||
``performance``: | ||
Calculation of isoline is performance-centric, quality of isoline is reduced to provide | ||
better performance. | ||
``balanced``: | ||
Calculation of isoline takes a balanced approach averaging between quality and performance. | ||
""" | ||
|
||
|
||
#: Use this config s optimised_for of isoline routing API. | ||
#: Example: for optimising for ``balanced`` mode use ``OPTIMISED_FOR.balanced``. | ||
OPTIMISED_FOR = OptimisedFor( | ||
**{"quality": "quality", "performance": "performance", "balanced": "balanced"} | ||
) | ||
|
||
|
||
class IsolineRoutingAvoidFeatures(Bunch): | ||
"""A class to define constant values for features to avoid during isoline calculation.""" | ||
|
||
|
||
#: Use this config for avoid_features of isoline API. | ||
#: Example: for ``tollRoad`` avoid_features use ``ISOLINE_ROUTING_AVOID_FEATURES.tollRoad``. | ||
ISOLINE_ROUTING_AVOID_FEATURES = IsolineRoutingAvoidFeatures( | ||
**{ | ||
"tollRoad": "tollRoad", | ||
"controlledAccessHighway": "controlledAccessHighway", | ||
"ferry": "ferry", | ||
"carShuttleTrain": "carShuttleTrain", | ||
"tunnel": "tunnel", | ||
"dirtRoad": "dirtRoad", | ||
"difficultTurns": "difficultTurns", | ||
} | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.