-
Notifications
You must be signed in to change notification settings - Fork 26
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
r5r 0.5-0 new feature: find snap points #168
Comments
Thank you, @mvpsaraiva . A few quick questions:
|
Good questions, @rafapereirabr Resolution 8 means approximately 600 m, on the equator. This entire grid-building functionality is provided natively by R5, so there's no need to add any dependency to r5r. This resolution (or zoom level) scheme is used by many web mapping tools that provide maps as tiles, such as OSM, Google Maps, Mapbox... The full list of resolutions, is below:
Yes, |
Great. The only thing we need to do then is to create an |
What do you think are good names for the wrap functions?
|
Does R5 include the "trip" from the given origin and destination points to their respective snapped points in the travel time estimation, assuming walking speed and as-the-crow-flies distance? That is what I get from their documentation, but I am not entirely sure.
|
Hi @luukvdmeer. Indeed, you are correct: those off-street segments from origin/destination points to the nearest street edges are taken into account and their travel times (as you guessed, considering walking speed and as-the-crow-flies distance) are added to the calculated on-road travel times. I've confirmed this by looking again at R5's source code. Thanks for pointing this out and providing the link to Conveyal's documentation. I've did a quick test, and you can se the effects are quite significant. In the screenshot below, |
Since there are many options to easily generate regular grids outside r5r, most notably using the |
Added the Now the user can pass a data.frame containing R5 tries to link points to the street network in two rounds, first using a search radius of 300m, then expanding the radius to 1.6km if the first round is unsuccessful. Points that aren't linked to the street network after those two rounds are returned with |
I think this function is complete, including documentation and tests. Shall we close this issue now? |
I agree this is complete. The issue will be automatically closed when we merge the dev branch into the master |
Setting this issue as priority, to be incorporated in the next package release. |
Two new functions are available in the dev version of r5r jar:
getGrid()
andfindSnapPoints()
.getGrid()
uses R5 functionality to generate a grid of regularly spaced cells in the Web Mercator projection, at a given zoom level.findSnapPoints()
is useful to analyse the actual origins and destinations of trips on the road network. Since R5's link radius is set to 1.6km, the actual linkage point can be located quite far away from the original location.To install the development version of
r5r
, use:Reproducible example of
getGrid()
andfindSnapPoints()
:The result will be the following:
The text was updated successfully, but these errors were encountered: