osrm | Docker image for running OSRM-backend in version | Continuous Deployment library
kandi X-RAY | osrm Summary
kandi X-RAY | osrm Summary
The OSRM project recently made a breaking change in the API between 4 and 5 - no other docker containers where available to use the latest API so I decided to take the last docker-image I was successfully using for a while and bumped the version and adjusted the startup script. It works for me and if you have any suggestions, please submit a PR. I will keep track on official minor updates and push new images to docker hub: irony/osrm5.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of osrm
osrm Key Features
osrm Examples and Code Snippets
Community Discussions
Trending Discussions on osrm
QUESTION
I have already installed an OSRM server - just the backend. And I have used it with Leaflet to calculate routes. I want to test other services so I came across Graphhoper.
Contrary to OSRM I can't find a manual on how to set up a local server. I want to have just the backend of Graphhoper that would do the calculations and pass them to Leaflet. My motivation for the local server is also the fact that in that case no API Key would be needed.
Is it even possible to install only the backend of Graphhoper? Or am I understanding something wrong?
Thank you in advance
...ANSWER
Answered 2021-Jun-08 at 06:25If you have a JVM installed you need to run two commands:
QUESTION
I have a time matrix in R which I computed with the help of osrm
package. I want to sort the points based on the neighboring points.
The sample data:
ANSWER
Answered 2021-May-31 at 22:34The solution depends on the starting point (that we can assume to be the first point in the data) and how the following point is selected.
Continuous pathThe following point is the nearest neighbor:
QUESTION
I'm new to python and programming in general so bear with me..
So i've pulled a request from an API but when I try to convert to json, i'm getting the following error
...ANSWER
Answered 2021-May-26 at 14:58According to the error output, you are getting an empty response. Maybe there is some issue with the url or you need to pass some headers along with the request.
You can print(route.text)
to debug the output of your request and then parse it later once you get a satisfactory output.
QUESTION
I have a Spark dataframe sdf
with GPS points that looks like this:
ANSWER
Answered 2021-Apr-12 at 15:15You can try aggregating the string after group by:
QUESTION
I have a Spark dataframe sdf
with millions of rows that contain GPS coordinates:
ANSWER
Answered 2021-Apr-12 at 07:38You can aggregate the dataframe as below:
QUESTION
I have a pandas dataframe with GPS points that looks like this:
...ANSWER
Answered 2021-Apr-06 at 15:52You can groupby
the dataframe on user
column, then apply make_request
to each group, and save outputs to output
dict (having user as key):
QUESTION
I would to know : If we save in OSRM server a dataset of points stored from a GPS tracker into a building (a flat one) : is it possible to request the server in order to find the shortest way from a point to another ? The aim would be to help customers/employees find their way into a place which has not any standard GIS data like roads, street and so on (like a stadium used during a convention, a zoo, an amusement park, and so on)
...ANSWER
Answered 2021-Apr-01 at 10:30Point clouds are not a valid data format for the OSRM. You will need OSM data. So you could use your GPS points to create a OSM Map of your building. For more infos about indoor mapping see: https://wiki.openstreetmap.org/wiki/Indoor_Mapping
QUESTION
My task is to deploy a third-party OSRM service on Amazon ECS Fargate.
For OSRM docker at startup, you need to transfer a file containing geodata.
The problem is that Amazon ECS Fargate does not provide access to the host file system and does not provide the ability to attach files and folders during container deployments.
Therefore, I would like to create an intermediate image that, when building, saved the file with geodata, and when starting the container, it would use it when defining volumes.
Thanks!
...ANSWER
Answered 2020-Dec-06 at 07:51As I understand it, Amazon ECS is a plain container orchestrator and does not implement docker swarm, so things like docker configs are off the cards.
However, you should be able to do something like this :-
QUESTION
I have a set of geographical points (lat, lon) and I want to compute a directed graph where:
- the nodes are those points
- an edge X->Y (between nodes X and Y) exists if the fastest path between X and Y doesn't pass through another node Z.
I am able to compute the duration of the path between any pair of nodes. Right now, I'm doing the following:
- compute the durations between every pair of nodes
- for every pair of nodes X,Y, there is an edge between X and Y if there is no node Z such that the duration of X->Z plus the duration of Z->Y is the same as the duration of X->Y.
I have tested this approach for a subset of the nodes and it seems to work, but since I have around 2000 nodes and the computation of the duration between nodes is computationally expensive (because it involves calculating the shortest path), I would like to know if there is a better approach.
Some additional (probably not relevant) info:
- The nodes are bus stop locations, taken from a GTFS feed
- I'm calculating the shortest paths durations using http://project-osrm.org/
Any help will be greatly appreciated
...ANSWER
Answered 2020-Oct-25 at 00:30I would start by running a Delaunay triangulation, this will give you an idea of what the path structure "should" look like (in theory). In theory, once you have the delaunary triangulation, it is easy to find the shortest paths. In practice however, you are using road networks instead of point-to-point distances, so you have to challenge those assumptions.
First build a way that given the Delaunay triangulation. Example of what the triangulation might look like below. Let's say that points HJG are within a city center and the points around it are a freeway that surrounds it. Say with a 65 mph or so speed limit. This means going from ABCG might be faster than AHG.
For every edge in the Delaunay triangulation. Determine the duration of the edge in both directions. This will give you your initial weights (it may also effect the triangulation if you can determine that the shortest path for AH is actually ABH). If there isn't a way to go around for faster routes. The ABCG being faster than AHG example. Then you are probably done at this point. If not you'll have to try to contract edges, which depending on your data, might require doing all routes anyway as you can't really be sure some obscure path allows it to be faster. Sadly, triangulation can't account for differences in speed between edges.
If you can set it up to tell you which point it does go through, then you can avoid having to run it on all paths. IE: If you can say have it tell you the fastest path AF, and it says it uses AHGF, then you can be reasonably sure that AHG and HGF are the shortest paths between AG and HF, and you don't need to run those. However, if you find that AF actually takes ABCEF instead, then there is clearly a great speed difference between the routes, and you should also check the fastest route to AG to ensure it's actually AHG. Whenever you find a faster edge, be sure to add to the triangulation. You may actually be able to add multiple edges. Basically the idea here is that the triangulation gives you an idea of what should be fastest routes if speed doesn't matter. However, you need to confirm or reject that hypothesis. Basically for each node. Find the shortest paths to all points via BFS. Take the longest path and explore it.
To aid in #3, it would likely help to vertex path covering of the edges in the graph. Create paths to all the furthest points from each point until all points are covered. IE: ABCD ABCE AHGF AHJKL AIK (also the reverse order as it is directional). Then you can run shortest path from AD, AE, AF, AL, and AK. If those paths match the expected paths, then you are done. If not, you'll be refining things along the way in the method used for #3 above. Worst case though, I'm not sure there's a way to get this much faster than all shortest paths in theory this approach is roughly O(VE).
In theory #4 requires starting at every vertex. However, vertices can be skipped if the connecting paths have been valid as being the shortest path, so I would likely recommend starting checking vertices with the least number of (un-validated?) edges. Though again, you may need to do all pairs to be 100% sure only the shortest edges connect each node.
For testing I would recommend doing this: Randomly select say 10-200 of those 2000 points. Run the algorithm on those 10-200 points. Then run all paths on those points. If they don't agree take a close look at why they don't agree. Feel free to add any "exceptional" cases to your answer and comment here. Repeat many times and see if there is any disagreement. Note all disagreements. If there are no disagreements, try running on the entire 2000 point set. I would strongly recommend doing this test after step 2. There is a chance that the Delaunay graph is very close to the optimal, depending on your dataset.
QUESTION
I understand that I can load traffic data into OSRM via osrm-contract:
https://github.com/Project-OSRM/osrm-backend/wiki/Traffic
However, I want to perform a routing by time of day and day of week in the future. Eg:
- From A to B next Wednesday at 8am
- From A to B next Wednesday at 2pm
- From A to B next Saturday at 8am
So I want it to consider rush hour, weekend traffic, etc.
I have lots of historical GPS data across cities that can be used to create the CSV file specified above for osrm-contract. However, it assumes traffic is the same across all days/hours and I need to have different "traffic profiles".
I thought about creating multiple different extractions with varying traffic patterns. Eg:
- Weekday morning traffic
- Weekday afternoon traffic
- Weekday evening traffic
- Weekend morning traffic
- Weekend afternoon traffic
- Weekend evening traffic
This would need 6 running instances of OSRM though.
Is there a better way to do this?
Thanks
...ANSWER
Answered 2020-Sep-22 at 14:21Unfortunately, it looks like OSRM does not support it at this time.
Valhalla may be a better option:
https://valhalla.readthedocs.io/en/latest/thor/simple_traffic/
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install osrm
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page