1

I have a problem of assigning possible ETA for a route. So far, I have the following:

  1. OSM data for a city.
  2. I have open source data of taxi trails for the same city.

Now, I am planning to divide the OSM data into route segments with a unique identifier for each. Meaning each segment is a route without any other route intersection/branching off and a value will be assigned.

For each segment, I will look up in my taxi data to see if it has travelled that segment. If yes, how much time did it take.

I wanted to know if this has been done already. I looked at GraphHopper in which I can get routes, but not segments.

Before going into pgRouting, I wanted to ask if there is any off-the-shelf best possible open source solution for the same?

  • What do you mean with segments? There is a map matching component for GraphHopper which could help you: github.com/graphhopper/map-matching – Karussell May 24 '15 at 20:16
  • If you need to estimate better speeds for every road from your taxi tracks that is completely doable with GraphHopper and the map matching. – Karussell May 24 '15 at 20:18
  • @Karussell: Thank you. This is perhaps what I need. I will experiment this with my data. – Spiralarchitect May 25 '15 at 3:14
1

As already commented: If you need to estimate better speeds for every road from your taxi tracks that is completely doable with GraphHopper and this open source map matching component for it.

  • Thanks. So far this solution is looking good. Will try out as it will take time and will message back if needed. – Spiralarchitect May 25 '15 at 10:32
  • If you don't mind, can you tell me how .gpx file looks like? I have raw location data with timestamp. Also, what does a edge mean here? Is the the actual strip of route from OSM data of the city or just route between 2 consecutive points which come from cab trail? – Spiralarchitect May 25 '15 at 15:15
  • E.g. see in the unit tests for the GPX file, or use the Java API instead where you use Java objects. An edge is a street connecting two junctions, so it is already snapped to road. – Karussell May 25 '15 at 22:13
  • Great! The library is just amazing and quick to use. I am still to figure out how to get time. I will post a separate question on that. – Spiralarchitect May 26 '15 at 8:43
0

Sounds like you are trying to implement what is known as Floating Car Data (FCD) analysis. This field has received a lot of interest from researchers since the analysis is far from trivial in most cases. There are multiple problems you have to solve, including but not limited to and . Depending on the temporal resolution of your taxi tracks, some steps can be more or less difficult to implement. As far as I know, there is currently no ready-to-use open source FCD system.

Check How to make routable OSM map for how to create a routing graph from OSM.

  • @underdrk: That's great. Sounds I am looking at a big problem. Can you help me at least how I can divide OSM data into segments with unique IDs? Can PostGIS+pgRouting help? – Spiralarchitect May 24 '15 at 11:41
0

If I understood you you correctly, you are going to let Taxi-data (recorded costs) have some impact on an already calculated graph with fixed costs und to somehow influence the route while (or before?) calculating? Is your data already assigned to OSM-Ids (Ways?) or, as you have already mentioned, should rather be assigned to segments (partial ways between intersections)? osm2po's API is designed to be highly customizable. Especially for these kinds of questions. But as the abbreviation API implies, you'll need small pieces written in Java to succeed. A slightly different question explaining how to use Eclipse with osm2po can be found here:

How to extend OSM2PO with ferry durations?

And don't be afraid of the word "Freeware", as it only refers to the core, which should be seen as some kind of (closed) Operating System. All the other stuff around is Open and pluggable. Pluggable means, that you are not dealing with tons of foreign source code and/or are forced to clone/checkout entire projects. Just concentrate on your task. By the way, you can even package your Taxi data into osm2po's graph file (container) if needed and deploy it this way.

If this is what you need, the first step is hooking into the API and customize/overwrite the DefaultJoinFilter, merge the Taxi-data and inject your implementation in the osm2po.config or directly as command line parameter.

For detailed questions, please contact me via mail.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.