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

Add parameter &matchPrecisionNot=street to geocoder request to improve relevance of results #145

Open
mraross opened this issue May 2, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@mraross
Copy link

mraross commented May 2, 2020

In the TRP app, if you enter:

 west v

as a route point, the app will issue the following request to the geocoder:

https://geocoder.api.gov.bc.ca/addresses.json?minScore=50&maxResults=5&echo=true&brief=true&autoComplete=true&addressString=west%20v

and get the following results:

West Boulevard, Vancouver, BC
East Boulevard, Vancouver, BC
rest area, Vernon, BC
rest area, West Vancouver, BC
West Grant Channel Pitt Lake, Indian Arm, BC

If you add &matchPrecisionNot=street to the geocoder request as follows:

https://geocoder.api.gov.bc.ca/addresses.json?minScore=50&matchPrecisionNot=street&maxResults=5&echo=true&brief=true&autoComplete=true&addressString=west%20v

you will get the following, more relevent results:

West Vancouver, BC
North Vancouver, BC
District of North Vancouver, BC
Villaverde Islands, BC
Viscount Island, BC

We just discovered this trick yesterday.

@mraross mraross added the enhancement New feature or request label May 2, 2020
@mraross
Copy link
Author

mraross commented May 2, 2020

There is a minor cost; you will no longer be able to find a bridge by its name since a bridge is defined as a street in ITN. We think entering a locality name is much more common than entering a bridge name. If a user needs to locate a bridge, they can still pan, zoom, and click.

In the longer term, we could add all named bridges to the geocoder as non-civic addresses (e.g., Golden Ears Bridge -- Township of Langley, BC)

@NicoledeGreef NicoledeGreef added this to For Discussion in TRP Maintenance May 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
TRP Maintenance
For Discussion
Development

No branches or pull requests

2 participants