Re: [OSRM-talk] OSRM match service for public transportation
This one won't return a subway route because I haven't configured it for that. I don't have subway trains in the dataset I'm working with for Toronto. But it would be pretty easy to make a subway only profile, or to add subways into this one if you want to do all transit modes in one profile. Take a look at this page for documentation on how profiles work: https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md If you want to understand how map matching in OSRM works generally, I think this paper is a good place to start: https://www.microsoft.com/en-us/research/wp-content/uploads/2016/12/map-matching-ACM-GIS-camera-ready.pdf When you change the profile, you're essentially configuring the street/rail/whatever network that your GPS trace will match against. Montreal definitely has subways in OSM; you can see them in the main map at openstreetmap.org. Best, Nate Wessel Jack of all trades, Master of Geography, PhD Candidate in Urban Planning SAUSy Lab <http://sausy.ca>, Sid Smith Hall, University of Toronto On 04/26/2018 10:52 AM, Patrick Agin wrote: Hi Nate and thank you very much for your help. I have a very basic question about your ttc profile (sorry if it's too silly). When you match a GPS dataset against this profile instance, will it return a subway route for example? If yes, why this subway route would be declared much plausible by osrm than the street route? Only because of the ttc profile? I realize that I don't understand very well the involved mechanisms behind osrm and profiles, if you can shed some light on this, I would greatly appreciate. Another question: I suppose that the subway data has to be included in the osm data of my city (Montreal) in order to get subway routes from match . How can I know if it's there or not in my osm data? Thank you again Nate, Patrick 2018-04-26 9:36 GMT-04:00 Nate Wessel <nate.wes...@mail.utoronto.ca <mailto:nate.wes...@mail.utoronto.ca>>: I've had some success with transit matching by simply modifying the car profile to allow routing on streetcar tracks, allowing access for buses and public service vehicles, etc. Here's a profile I'm using for transit now: https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua#L347 <https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua#L347> I had also tried to develop a more transit specific profile from the ground up. My thought was that known transit routes (provided in the OSM data) would be preferred by modifying their edge weights. This however ran into an issue with the matching service which hasn't been resolved yet; edge weights simply aren't used in match results. https://github.com/Project-OSRM/osrm-backend/issues/4785 <https://github.com/Project-OSRM/osrm-backend/issues/4785> If anyone has a suggestion for the question about multimodal paths, I would be very keen to hear it, however I suspect this is still an open topic of research with no definite best practices. Best, Nate Wessel Jack of all trades, Master of Geography, PhD Candidate in Urban Planning SAUSy Lab <http://sausy.ca>, Sid Smith Hall, University of Toronto On 04/26/2018 09:01 AM, Patrick Agin wrote: Dear all, I'm a newbie to routing engines and my first attempts are with OSRM. Specifically I want to use the/match /service. Questions I have is : 1) is it possible with match service to specify public transport (e.g. subway) as the mode of transportation? I see only profiles for car, bike and foot. If not, is there a solution? I'm pretty sure it it possible but how? I saw in some profiles the public_transport parameter but I don't know how to use it. 2) is it possible for match to return a multi-modal path given the timestamps of each coordinate? For example, return a sub-path that is the most plausible for pedestrian (chosen because of the low speed inferred from timestamps) followed by another subpath that is the most plausible for car (because of a higher speed)? Or is the only solution to pre-process the data to infer by myself the mode of transportation and make subsequent calls to the corresponding profile instance? Thanks a lot, Patrick ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org <mailto:OSRM-talk@openstreetmap.org> https://lists.openstreetmap.org/listinfo/osrm-talk <https://lists.openstreetmap.org/listinfo/osrm-talk> ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org <mailto:OSRM-talk@openstreetmap.org> https://lists.openstreetmap.org/listinfo/osrm-talk <https://lists.openstreetmap.org/listinfo/osrm-talk> ___ OSRM-talk mailing list OSRM-talk@ope
[OSRM-talk] Does the matching service make use of edge rates?
Hi all, I've recently been playing with the new relation support in profiles, trying to get my map-matching results to favour transit routes. For testing purposes, I've set rates and speeds on all streets to the same value, but multiplied rates on streets with transit routes by 30x. (so I should be able to see an effect, right?) The route service seems to show the effects of this, giving me some weird results that clearly follow known transit lines very closely. When I use the matching service however, I don't see a similar effect. I have a few test cases I'm looking at (GPS traces from transit vehicles) that hadn't been matching to their routes properly, but which looked like they could with a little nudge. However the map-matching result is seemingly unchanged regardless of the way I set rates on edges. Does the matching service even support custom edge weights? If so, do I have to enable this feature somehow, or what else could I be missing? Thanks, -- Nate Wessel Jack of all trades, Master of Geography, PhD Candidate in Urban Planning SAUSy Lab <http://sausy.ca>, Sid Smith Hall, University of Toronto ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk
Re: [OSRM-talk] Map-matching transit vehicles: giving preference to known routes?
Hi Daniel, Thanks for the link to the documentation! I had indeed not seen that - it was very helpful. I'm a little unclear though on what the difference between "weight" and speed and length. Is "weight" equivalent to the "cost" of traversing an edge, which would presumably be a function of speed and length? Or does a higher weight give preference to an edge over others? And what happens if I have an edge with a high weight and a low speed or vice versa? i.e. how do weight and speed (and duration?) interact in the selection of a shortest path? Are these all names for the same thing? Thanks, Nate Wessel Jack of all trades, Master of Geography SAUSy Lab <http://sausy.ca>, Sid Smith Hall On 05/22/2017 08:28 AM, Daniel Hofmann wrote: Actually we base map matching on the distance of _the fastest path_ here: https://github.com/Project-OSRM/osrm-backend/blob/a63b43c259d49fc4915810eb4bfdd86bc78bce93/src/engine/routing_algorithms/map_matching.cpp#L220-L226 I got confused a bit this morning because `getNetworkDistance` does this two levels of indirection approach. So if you set edge weights in the profiles accordingly (based on if a way is a transit-relevant way or not) orsm will find the fastest route and then does map matching on it based on its distance. Hope that helps On Mon, May 22, 2017 at 10:38 AM, Daniel Hofmann <hofm...@mapbox.com <mailto:hofm...@mapbox.com>> wrote: Did you see the profile docs here? Granted they could be more detailed but should get you started. If you have anything to add we're always happy for pull requests :) https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md <https://github.com/Project-OSRM/osrm-backend/blob/master/docs/profiles.md> What I can suggest is to - always provide timestamps otherwise defaults will be used internally - investigate the map matching's tidy option for blob removal (think: waiting at a traffic signal) Unfortunately map matching is distance based so modifying edge weights or speeds in the profiles won't help. And completely discarding ways won't help you either since you specifically want to capture detours. Maybe have a look at Figure 7 in the map matching paper "Hidden Markov Map Matching Through Noise and Sparseness. And then just give it a try with your data and see how it goes. There are probably other ways to do your analysis, e.g. map match your traces on a regular profile and then compare the results against a osrm route query on a transit-ish profile. For this transit-ish profile you could set low weights (note: modify weights, keep speeds for correct ETAs) except for actual transit routes. I don't know if the transit data is good enough for this, though. Interested in what you find out. On Mon, May 22, 2017 at 2:02 AM, Nate Wessel <nate.wes...@mail.utoronto.ca <mailto:nate.wes...@mail.utoronto.ca>> wrote: Hi all, I have recently been using OSRM to do map-matching for transit vehicles, with locations from historical GPS data. The documentation on creating profiles is pretty minimal from what I can tell, so I've just been able to make a few modifications to the car.lua profile to allow vehicles to go on streetcar tracks, agency service roads, etc. The data I've been playing with so far has a ~20second sampling frequency, which has worked well, but I'm about to start working with data that has a lower sampling rate (30-60secs) and I'm worried that I'll get a lot of spurious matches. I was wondering if it is possible to modify the profile such that a strong preference is given to known transit routes (which are tagged with route relations in OSM). Transit almost always follows a known route, but sometimes it detours, and it's important to my research to be able to capture that in matched GPS data. What might be a good way to add this to a routing profile? Does everything in the profile come down to speed, access, and node-related penalties? Would I want to artificially inflate the "speed" of transit-served streets? Is there more thorough documentation on profiles somewhere than what is provided here <https://github.com/Project-OSRM/osrm-backend/wiki/Profiles>? The profile I've been using is: https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua <https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua> Any help would be greatly appreciated! -- Nate Wessel Jack of all trades, Master of Geography SAUSy Lab <http://sausy.ca>, Sid Smith Hall ___ OSRM-talk
[OSRM-talk] Map-matching transit vehicles: giving preference to known routes?
Hi all, I have recently been using OSRM to do map-matching for transit vehicles, with locations from historical GPS data. The documentation on creating profiles is pretty minimal from what I can tell, so I've just been able to make a few modifications to the car.lua profile to allow vehicles to go on streetcar tracks, agency service roads, etc. The data I've been playing with so far has a ~20second sampling frequency, which has worked well, but I'm about to start working with data that has a lower sampling rate (30-60secs) and I'm worried that I'll get a lot of spurious matches. I was wondering if it is possible to modify the profile such that a strong preference is given to known transit routes (which are tagged with route relations in OSM). Transit almost always follows a known route, but sometimes it detours, and it's important to my research to be able to capture that in matched GPS data. What might be a good way to add this to a routing profile? Does everything in the profile come down to speed, access, and node-related penalties? Would I want to artificially inflate the "speed" of transit-served streets? Is there more thorough documentation on profiles somewhere than what is provided here <https://github.com/Project-OSRM/osrm-backend/wiki/Profiles>? The profile I've been using is: https://github.com/SAUSy-Lab/retro-gtfs/blob/master/etc/ttc.lua Any help would be greatly appreciated! -- Nate Wessel Jack of all trades, Master of Geography SAUSy Lab <http://sausy.ca>, Sid Smith Hall ___ OSRM-talk mailing list OSRM-talk@openstreetmap.org https://lists.openstreetmap.org/listinfo/osrm-talk