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

in geocoder, add serviceCentres/nearestByRoad resource #156

Closed
mraross opened this issue Mar 21, 2017 · 6 comments
Closed

in geocoder, add serviceCentres/nearestByRoad resource #156

mraross opened this issue Mar 21, 2017 · 6 comments

Comments

@mraross
Copy link
Contributor

mraross commented Mar 21, 2017

Assessors at BC Assessment need to know the occupants nearby that would affect a property's value (e.g., railyard, school, firehall).

This will require the implementation of the roadVoronoi resource in the route planner.
Input parameters should include accessPoint which will be snapped to the nearest road but should be where the driveway hits the road.

@cmhodgson
Copy link
Collaborator

I'm not too sure how you visualize this working. The geocoder has the occupants, the router has the roads. You could implement this right now by calling:

geocoder/occupants/within?center=<property location>&distance=<maximum distance of concern> 

and then call

router/distance/betweenPairs?fromPoints=<propertyLocation>&toPoints=<the points returned in the occupants query>

This is literally 5 to 10 lines of JavaScript on the client side. If we speed up betweenPairs by using the "marching outward" algorithm then this would work fantastically for even large numbers of nearby occupants. The client would even have the flexibility to use different distances for different occupant types (tags) by just adding tags to the first query and doing it a few times. Maybe it only matters if you are within 500m of a coffee shop, but 5km of a sewage treatment plant ;)

@mraross
Copy link
Contributor Author

mraross commented Mar 21, 2017

The flaw in your plan is that there are road network layouts in which occupants/within will not return all the needed occupants for step 2 (think city with a river running through it). This is what we discovered in the ACDF and why we abandoned the two-step plan (aka the unholy mixing of metrics). I will be adding a roadVoronoi enhancement to the route planner soon which will explain how nearestByRoad can work with no failure cases.

@mraross
Copy link
Contributor Author

mraross commented Apr 26, 2017

All nearestByRoad computations should be done offline during route/address data prep. This will work with our current monthly update cycle but certainly won't work if we have daily road, address, and occupant updates.

@mraross mraross added this to the Route Planner 1.4 milestone Apr 26, 2017
@cmhodgson
Copy link
Collaborator

I assume you mean this to work as the inverse of the occupant service area boundary - this works as long as the service areas are purely distance-based. If the service areas are calculated using the population in some way, they we need multiple different kinds of "service areas" pre-computed and stored, per segment. If you have many occupant types this can get to be a lot of memory, and a lot of calculation (off-line so I suppose not a real concern).

@mraross
Copy link
Contributor Author

mraross commented Apr 28, 2017

They wouldn't be population based but you do raise an interesting option to support both fastest and shortest metrics. I guess we should ask clients if they had to pick one metric, what would it be.

@mraross mraross changed the title in geocoder, add occupants/nearestByRoad resource in geocoder, add occupants/{id}/nearestByRoad resource Apr 28, 2017
@mraross mraross changed the title in geocoder, add occupants/{id}/nearestByRoad resource in geocoder, add serviceCentres/nearestByRoad resource Apr 28, 2017
@mraross
Copy link
Contributor Author

mraross commented Oct 22, 2019

Issue moved to bcgov/ols-geocoder #51 via ZenHub

@mraross mraross closed this as completed Oct 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants