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

Map matching known paths #210

Closed
grobins opened this issue Jun 14, 2023 · 2 comments
Closed

Map matching known paths #210

grobins opened this issue Jun 14, 2023 · 2 comments

Comments

@grobins
Copy link

grobins commented Jun 14, 2023

I have 600,000 trips across a city with known GPS start, end, and waypoints. The waypoints are roughly 100m apart.

I want to get the OSM IDs of all segments visited en-route, so that I can build a volume map of trips per OSM segment.

Is this something I can do with dodgr? So far I've only seen origin/destination examples.

@mpadge
Copy link
Member

mpadge commented Jun 15, 2023

Thanks for asking @grobins, and the answer is definitely yes. You say you ultimately want a "volume map", which sounds like the flow aggregation functions might be what you want. Those functions generally add an extra column of "flows" to the network, with aggregate flows then directly mapped on to each edge, so you've directly got the OSM ID and corresponding "flow" or "volume".

The trickest bit is likely to be that dodgr does not currently have any way to force routing through specified waypoints, so i guess what you'd need there would be to break each trip into start and end points for each segment. If it's a typical city, 600,000 trips might then translate to 6,000,000 or so individual segements. That kind of job is definitely do-able on a typical laptop. You could use match_pts_to_verts() to initially aggregate the 6 million points to some lesser number of common vertices to improve efficiency.

Let me know if that helps, and feel free to ask any more questions you might have.

@grobins
Copy link
Author

grobins commented Jun 28, 2023

Thanks I'll give that a go

@mpadge mpadge closed this as completed May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants