Skip to content

Commit

Permalink
Add ignore_ flags for costing options
Browse files Browse the repository at this point in the history
  • Loading branch information
ianthetechie committed Mar 21, 2024
1 parent c172668 commit 373390c
Show file tree
Hide file tree
Showing 109 changed files with 176 additions and 116 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Version 2.1.0 - 2024-03-21

### Added

- `ignore_` options for ignoring various restrictions (useful for certain map matching applications)

## Version 2.0.0 - 2024-03-20

### Changed
Expand Down
3 changes: 3 additions & 0 deletions docs/AutoCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**height** | **float** | The height of the automobile (in meters). | [optional] [default to 1.9]
**width** | **float** | The width of the automobile (in meters). | [optional] [default to 1.6]
**toll_booth_cost** | **int** | The estimated cost (in seconds) when a toll booth is encountered. | [optional] [default to 15]
Expand Down
3 changes: 3 additions & 0 deletions docs/BaseCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]

## Example

Expand Down
3 changes: 3 additions & 0 deletions docs/BicycleCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**bicycle_type** | **str** | The type of bicycle: * Road: has narrow tires and is generally lightweight and designed for speed on paved surfaces * Hybrid or City: designed for city riding or casual riding on roads and paths with good surfaces * Cross: similar to a road bike, but has wider tires so it can handle rougher surfaces * Mountain: able to handle most surfaces, but generally heavier and slower on paved surfaces | [optional] [default to 'Hybrid']
**cycling_speed** | **int** | The average comfortable travel speed (in kph) along smooth, flat roads. The costing will vary the speed based on the surface, bicycle type, elevation change, etc. This value should be the average sustainable cruising speed the cyclist can maintain over the entire route. The default speeds are as follows based on bicycle type: * Road - 25kph * Cross - 20kph * Hybrid - 18kph * Mountain - 16kph | [optional]
**use_roads** | **float** | A measure of willingness to use roads alongside other vehicles. Values near 0 attempt to avoid roads and stay on cycleways, and values near 1 indicate the cyclist is more comfortable on roads. | [optional] [default to 0.5]
Expand Down
3 changes: 3 additions & 0 deletions docs/MotorScooterCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**height** | **float** | The height of the automobile (in meters). | [optional] [default to 1.9]
**width** | **float** | The width of the automobile (in meters). | [optional] [default to 1.6]
**toll_booth_cost** | **int** | The estimated cost (in seconds) when a toll booth is encountered. | [optional] [default to 15]
Expand Down
3 changes: 3 additions & 0 deletions docs/MotorcycleCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**height** | **float** | The height of the automobile (in meters). | [optional] [default to 1.9]
**width** | **float** | The width of the automobile (in meters). | [optional] [default to 1.6]
**toll_booth_cost** | **int** | The estimated cost (in seconds) when a toll booth is encountered. | [optional] [default to 15]
Expand Down
3 changes: 3 additions & 0 deletions docs/TruckCostingOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ Name | Type | Description | Notes
**service_factor** | **float** | A factor that multiplies the cost when service roads are encountered. The default is 1.2 for cars and busses, and 1 for trucks, motor scooters, and motorcycles. | [optional] [default to 1]
**use_living_streets** | **float** | A measure of willingness to take living streets. Values near 0 attempt to avoid them, and values near 1 will favour them. Note that as some routes may be impossible without living streets, 0 does not guarantee avoidance of them. The default value is 0 for trucks; 0.1 for other motor vehicles; 0.5 for bicycles; and 0.6 for pedestrians. | [optional]
**use_ferry** | **float** | A measure of willingness to take ferries. Values near 0 attempt to avoid ferries, and values near 1 will favour them. Note that as some routes may be impossible without ferries, 0 does not guarantee avoidance of them. | [optional] [default to 0.5]
**ignore_restrictions** | **bool** | If set to true, ignores any restrictions (eg: turn and conditional restrictions). Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**ignore_non_vehicular_restrictions** | **bool** | If set to true, ignores most restrictions (eg: turn and conditional restrictions), but still respects restrictions that impact vehicle safety such as weight and size. | [optional]
**ignore_oneways** | **bool** | If set to true, ignores directional restrictions on roads. Useful for matching GPS traces to the road network regardless of restrictions. | [optional]
**height** | **float** | The height of the truck (in meters). | [optional] [default to 4.11]
**width** | **float** | The width of the truck (in meters). | [optional] [default to 2.6]
**toll_booth_cost** | **int** | The estimated cost (in seconds) when a toll booth is encountered. | [optional] [default to 15]
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "stadiamaps"
version = "2.0.0"
version = "2.1.0"
description = "Stadia Maps Geospatial APIs"
authors = ["Stadia Maps Support <support@stadiamaps.com>"]
license = "BSD-3-Clause"
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand All @@ -22,7 +22,7 @@
# prerequisite: setuptools
# http://pypi.python.org/pypi/setuptools
NAME = "stadiamaps"
VERSION = "2.0.0"
VERSION = "2.1.0"
PYTHON_REQUIRES = ">=3.7"
REQUIRES = [
"urllib3 >= 1.25.3, < 2.1.0",
Expand Down
4 changes: 2 additions & 2 deletions stadiamaps/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
""" # noqa: E501


__version__ = "2.0.0"
__version__ = "2.1.0"

# import apis into sdk package
from stadiamaps.api.geocoding_api import GeocodingApi
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/api/geocoding_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/api/geospatial_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/api/routing_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
4 changes: 2 additions & 2 deletions stadiamaps/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down Expand Up @@ -88,7 +88,7 @@ def __init__(
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/2.0.0/python'
self.user_agent = 'OpenAPI-Generator/2.1.0/python'
self.client_side_validation = configuration.client_side_validation

def __enter__(self):
Expand Down
6 changes: 3 additions & 3 deletions stadiamaps/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down Expand Up @@ -399,8 +399,8 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 6.0.0\n"\
"SDK Package Version: 2.0.0".\
"Version of the API: 6.1.0\n"\
"SDK Package Version: 2.1.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/models/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/models/admin_region.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
2 changes: 1 addition & 1 deletion stadiamaps/models/administrative.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
The Stadia Maps Geospatial APIs provide you with the data you need to build awesome applications.
The version of the OpenAPI document: 6.0.0
The version of the OpenAPI document: 6.1.0
Contact: support@stadiamaps.com
Generated by OpenAPI Generator (https://openapi-generator.tech)
Expand Down
Loading

0 comments on commit 373390c

Please sign in to comment.