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

Isochrone Support #5910

Open
mjjbell opened this issue Dec 13, 2020 · 16 comments
Open

Isochrone Support #5910

mjjbell opened this issue Dec 13, 2020 · 16 comments
Milestone

Comments

@mjjbell
Copy link
Member

mjjbell commented Dec 13, 2020

Interested to gauge demand for isochrone / one-to-all query support in OSRM.

There have been previous proof of concepts that didn't make it to mainline.
@danpat it looks like you were involved in these. Perhaps you have some insights into how feasible this is now and whether any of these POCs can be revived?

There are some specialised isochrone algorithms for both MLD and CH style preprocessing, which would be consistent with OSRM's performance characteristics and provide an alternative to the isochrone support provided by other routing engines.

Personally, it's a use-case I'm frequently having. I've been extending RoutingKit to do this as it already uses a PHAST-like graph representation, but it would be nice to combine this with OSRM's extraction flexibility and features.

@danpat
Copy link
Member

danpat commented Dec 14, 2020

Sigh, I wish I'd finished my branch. The blockers on my PHAST implementation (#3652) were:

  1. PHAST requires a way to iterate over the CH nodes in descending order - OSRM does not store nodes in this order, nor is there an index, so the fast "reverse" phase of PHAST cannot be done without fixing that.
  2. Deciding on the output format - approximate polygons, or an exact tree format.

I think an isochrone implementation would be very useful.

@frodrigo
Copy link
Member

Yes, also for me the isochrone are the big missing thing on OSRM. I already need to write myself a wrapper on to of OSRM using a one-to-may matrix, or using one of the existing POC.

@TimMcCauley
Copy link

@danpat do you have a rough idea how much would be missing to enhance PHAST to RPHAST which would speed up the matrix requests by a magitude?

@mvl22
Copy link

mvl22 commented Feb 1, 2021

There is Galton:
https://github.com/urbica/galton

However, as noted in urbica/galton#231 this works to 5.17.2 but will need some kind of adjustment for >5.17.2.

Perhaps someone can add a patch to that?

@Skrol29
Copy link

Skrol29 commented Mar 2, 2021

This issue should be tagged as « feature request ».

Isochrone is a missing key in OSRM. For now it is usually partially solved by a walk-around using a route-grid, but this is limited and expensive, while Isochrone is a commonly needed feature.

Isochrone !

@guillaume-vignal
Copy link

Hello,
is there some news on creating isochrone map with OSRM ?

@TheMarex
Copy link
Member

TheMarex commented Sep 3, 2021

I could have sworn that we actually shipped this. Oh well. 😅

For what it's worth this is super simple with the MLD graph (one-to-all with proper termination), I would recommend to just not implement it for CH because it is so tricky. I would recommend a polygon output because that is in line with other implementation I've seen.

@danpat
Copy link
Member

danpat commented Sep 3, 2021

Nah, I never got it finished. The blocker for CH was the ability to do the reverse order node iteration.

@mjjbell
Copy link
Member Author

mjjbell commented Apr 8, 2022

I've been making sporadic progress on isochrone support. Here's an update.

I have created OSRM implementations of isoDijkstra and isoMLD, as described in the paper linked in the first post.
iso_london_3

One notable feature of the implementation is the planarization of the OSM graph for creating isochrone boundaries. This planar embedding is independent of the OSRM graph, which means it doesn't require reprocessing when the weights are updated, such as via osrm-customize.

See the following example where the reachable boundary follows a path via a planarization node that is not in OSM.
iso_planar
iso_planar_nodes

The main problem with implementation is the output is too accurate, it returns a traversal of all the boundary faces of the reachable area. The resultant output has a huge number of lines, which makes visualisation performance very bad.

To explain visually by looking at the debug output, rather than returning the full reachable boundary, we want to instead return the simplest possible polygon between the yellow (reachable) and orange (unreachable) boundaries, intersecting the grey lines (boundary edges).
iso_debug

My plan is to implement one of the strategies suggested in this paper for simplifying the output, but there are still some issues around external boundaries that will need figuring out.

In any case, I'm still a way off from submitting a patch (a lot of tidying up is required), but I thought it would be useful to communicate some progress.

@SiarheiFedartsou
Copy link
Member

Likely I don’t know something obvious about OSRM, but I am curious why cannot we just port algorithm from Valhalla(there is also this paragraph in docs)? It looks quite simple and straightforward.

@lgrd
Copy link

lgrd commented Apr 6, 2023

Hi there,
I'm very pleased to discover what has been done here !
@mjjbell do you have some good news to share with us ? :)

@mvl22
Copy link

mvl22 commented Apr 26, 2023

@mjjbell

The main problem with implementation is the output is too accurate, it returns a traversal of all the boundary faces of the reachable area. The resultant output has a huge number of lines, which makes visualisation performance very bad.

Could I suggest that, while that can be an issue, what you have done so far will nonetheless be very useful in some cases. IMO it would be better to publish something that is useful in some cases, with that in the main branch making it easier for others to perfect later, than wait for things to be perfect which might never happen.

@mjjbell
Copy link
Member Author

mjjbell commented Jun 26, 2023

I did actually make more progress since the last update, to the point where I made a hype video thread showing what it could do.

I was getting stuck on getting it to perform at "scale", as the algorithm was tricky to parallelise on edge-expanded graphs. Then the pandemic ended and I went outside.

In any case, I do have a use-case where even a slowish version would be beneficial, so I'll resurrect this work and start submitting some PRs. But first I need to remind myself how it works...

@lgrd
Copy link

lgrd commented Jun 27, 2023

@mjjbell thank you for your answer and all this work ! :)

@azarz
Copy link

azarz commented Jun 27, 2023

@mjjbell
Very nice work, congrats! I would also be very interested if isochrone support makes it into the main OSRM project 😁

@mjjbell mjjbell added this to the 6.0 milestone Aug 20, 2023
@hannesaddec
Copy link

Same here.. would be cool to get in so we can start contributing

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