Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snap tolerance parameter #356

Open
BK01 opened this issue Dec 8, 2022 · 3 comments
Open

Snap tolerance parameter #356

BK01 opened this issue Dec 8, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request ROUTE PLANNER

Comments

@BK01
Copy link
Contributor

BK01 commented Dec 8, 2022

Current state:
The BC Route Planner will compute a route along the road network to (or parallel to) coordinates within 1km of the road centre-line [MAX_SNAP_DISTANCE = 1000].

Test case: Destination is approx 1.2km from the road.
https://router.api.gov.bc.ca/directions.json?points=-123.14517%2C49.70719%2C-123.12172%2C49.68690&snapDistance=1200

Future state:

  • Provide a parameter to enable developers to override that number by providing a new value in metres (snapDistance=1200).
@cmhodgson
Copy link
Collaborator

We never discussed the name of the parameter, but I went with the initial suggestion "snapDistance" - this is a request parameter than can be set for each request. I also setup an application-level configuration parameter called defaultSnapDistance which can be changed using the config UI or editing the configuration files, this sets the default value of the snapDistance parameter if no value is specified in the request.

@cmhodgson cmhodgson self-assigned this Jan 20, 2023
@cmhodgson
Copy link
Collaborator

Note that the existing "demo" support for 511 events now uses the defaultSnapDistance config parameter as a limit for how far events can be from segments and still be attached to them. The existing demo 511 event file contains only very close matches so this tolerance isn't really used at this time.

cmhodgson added a commit that referenced this issue Feb 2, 2023
#348 Add refernce data dates to response
#355 Enable Transport Line IDs in response
#356 Snap Tolerance parameter
@BK01
Copy link
Contributor Author

BK01 commented Dec 19, 2023

Validated in BC Route Planner 2.2 (router-dev.api.gov.bc.ca) on Dec 19, 2023. Test case above used with a distance of 1000m (no route found) and 1200m (route found)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ROUTE PLANNER
Projects
None yet
Development

No branches or pull requests

2 participants