Project-OSRM / osrm-backend

Open Source Routing Machine - C++ backend
http://map.project-osrm.org
BSD 2-Clause "Simplified" License
6.33k stars 3.34k forks source link

Lat/Lon Traffic Data with OSRM #7019

Open Deepak028 opened 1 month ago

Deepak028 commented 1 month ago

Hello,

I am currently working on integrating traffic data from a provider with OSRM (Open Source Routing Machine). I have traffic data that includes latitude and longitude pairs along with speed information. However, I'm encountering difficulties in making this data compatible with OSRM for routing purposes.

What I Have Traffic Data Format: The data I receive from the provider includes latitude and longitude pairs for from and to locations and associated speed information. An example of the data looks like this:

from_lat,from_lon,to_lat,to_lon,speed
12.9716,77.5946,12.9717,77.5947,40
12.9716,77.5946,12.9715,77.5945,30

Current Data Storage: The data is currently stored in a CSV file.

Issue

I need guidance on how to transform this data into a format compatible with OSRM. Specifically, I am looking for help with the following:

Converting Lat/Lon Data: How do I map the latitude and longitude pairs to OSRM’s internal road network IDs or segments?

Integrating Speed Information: How should I integrate the speed information into OSRM’s data model? Are there specific files or formats required for incorporating this data?

Updating OSRM Data: What are the steps to update OSRM’s data with the new traffic information so that it reflects accurately in routing results?

Steps Taken

Reviewed OSRM documentation on traffic data integration.
Attempted various methods to convert latitude/longitude pairs into OSRM-compatible formats without success.

Additional Information

I am using OSRM with Docker, and my setup includes [details about your OSRM setup if applicable].
Sample data files or additional information can be provided if needed.

Any help or pointers towards relevant documentation or examples would be greatly appreciated.

Thank you!