Questions tagged [open-source-routing-machine]
OSRM (Open Source Routing Machine) computes shortest paths in a graph. It was designed to run well with map data from the Openstreetmap Project.
83
questions
0
votes
0
answers
21
views
Doing 1-1 matches in OSRM in R
I am trying to build a distance "matrix" from two vectors of points in a dataset using OSRM, using a set up similar to that of mapdist or gmapsdistance.
hs<-hs_sf%>%
st_as_sf(crs=...
2
votes
1
answer
230
views
Calculate the correct OSRM route distance in OpenLayers?
I extended this helpful fiddle by Jonatas Walker
https://jsfiddle.net/jonataswalker/079xha47/
by a route distance output. Here's the JS Code used:
var points = [],
msg_el = document.getElementById('...
1
vote
1
answer
178
views
How to workaround OSRM map match {"message":"Too many trace coordinates","code":"TooBig"}
I have created a web page to test OSRM map match service (running locally in the latest osrm/osrm-backend docker image), before starting to integrate it into my app.
And when sending just 4 locations (...
4
votes
1
answer
235
views
Retrieve map matched ways (and not just nodes) using OSRM and Overpass API
For my question I have prepared a jsFiddle demo requiring you to click at the map 5 times:
If I understand this correctly, the OSRM does not care about ways.
It only cares about nodes and their ...
2
votes
1
answer
67
views
Nodes returned by OSRM map match service not found in the PostGIS database
The call to OSRM map matching returns a list of nodes:
{"code":"Ok","matchings":[{"confidence":0.000854076,"geometry":{"coordinates":[[8....
1
vote
0
answers
279
views
How to get way ids from the OSRM map matching service
Calling OSRM map matching returns coordinates and nodes:
{"code":"Ok","matchings":[{"confidence":0.000854076,"geometry":{"coordinates":[[8....
3
votes
1
answer
226
views
How can I debug OSRM?
I am trying to map match GPS traces onto waterways using the Open Source Routing Machine (OSRM). I have a working set-up, but for some reason some waterways are not being map matched to, eventhough ...
0
votes
0
answers
86
views
Optimize OSRM's lua profile
Are there packages to optimize e.g. the car lua-profile (car.lua)?
There are parameteres and I would like to use an existing data set to optimize e.g. max_speed_for_map_matching to fit "OSRM-...
1
vote
0
answers
95
views
Lua error when trying to extract OSRM data
I am using a newer MacBook Pro with a Silicon chip. Following the example here (https://github.com/stanfordfuturebay/osrm-local), I am trying to extract data downloaded from https://download.geofabrik....
0
votes
1
answer
204
views
How to use remote openstreetmap osrm server for USA
How can I use a remote osrm server to calculate driving distances in the USA (or North America). If at all possible, I would really like to avoid having to set up my own local server.
I am basing my ...
1
vote
0
answers
207
views
Activating 'on click' event on the path created by router in Leaflet?
I have some points retrieved from the database, and with them, I draw and create my path and markers.
I would like that when the user adds another marker to the route, a click event is activated.
I ...
0
votes
0
answers
161
views
Buttons that doesn't show well: Leaflet Routing machine
I have a basic Leaflet map (v1.7)
<div id="map" class="map" style="width: 100%; height: 100%"></div>
<script>
// base map
const map = L.map('...
1
vote
0
answers
145
views
R OSRM Iso giving Error
I'm trying to run osrmIsodistance and osrmIsochrone and keep getting the same error when I type a negative coordinate, been looking for an answer but couldn't find it. This is the code I'm running.
...
0
votes
0
answers
353
views
Understand OSRM trip source and destination parameters
I'm having difficulties to understand OSRM api trip outputs with the parameters source and destinations. I find the output reasonable when i set:
The source to first and the destination to any, where ...
0
votes
0
answers
31
views
Leaflet.js: Is a Circle a good way to create a search for an area to create a route? [duplicate]
I am trying to create a route for a user based on a search of an area based on topography data. The criteria is an elevation property.
E.G. a user can search an area and get a route based on elevation....
1
vote
0
answers
77
views
OSRM ignoring roads without empty names
I want to ignore all roads that have an empty 'name' field when running match in OSRM. I have looked through the documentation, including the profiles, and cannot seem to figure it out. Is this ...
0
votes
0
answers
945
views
Leaflet Routing Machine: How do you implement L.Routing.OSRMv1.extend for custom routes?
I'd like to change the Latitude and Longitude which make up a route.
For example I have point A and point B the routing machine will create the coordinates and generate the details for the itinerary ...
1
vote
0
answers
129
views
Find corresponding OSM ways to a set of coordinates
I'm currently building a routing application that is based on the Open Source Routing Machine (OSRM), which uses OSM data. For the routes i am trying to generate elevation profiles using SRTM data.
So ...
3
votes
1
answer
564
views
OSM pbf from Geofabrik call with bounding box
I want to use a limited area within a geofabrik dataset.
I am wondering if I can use a wget call with a boundig box limitation.
e.g. something like this.
wget http://download.geofabrik.de/europe/...
0
votes
0
answers
843
views
OSRM API provides various results for route, is this server issue?
We started to try the potential for OSRM
but I have a question related to how is set the server.
Those 2 queries:
http://router.project-osrm.org/route/v1/foot/2.770657539367676,42.48209897188378;2....
1
vote
0
answers
59
views
Add routing control to another div instead of map in Leaflet [duplicate]
I have a React app which shows bike stations on a Leaflet map. If the user clicks the station, it routes the user to that station (Leaflet routing machine). How can I add routing control div to ...
2
votes
0
answers
266
views
OSRM Isochrone - straight/square edges
I am calculating 1 hour cycling distance using osrmIsochrone in R and Docker. I have noticed that the polygons have square/straight edges. (see below example)
Increasing the res even to high values (...
2
votes
1
answer
281
views
Osmium and OSM: Remove a relation from .pbf map file
I am trying to use osmium to remove a relation from a .pbf file (specifically the Denmark extract from Geofabrik)1. The relation is part of a cycle network. I essentially want to calculate routing ...
0
votes
1
answer
296
views
Storing route in PostGIS Database
I am trying to save few routes created by OSRM which is in Polyline or GeoJSON format in my PostGIS Database.
How can I save the data in such a format which I can use to search with coordinates ...
1
vote
1
answer
138
views
Is it possible to use OSRM in order to calculate routing into a building?
I would like to know: If we save in the 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 ...
1
vote
0
answers
435
views
OSRM Contract with multiple input OSM files stalling
I received multiple shapefiles for USA states map data split into different groups of states.
Approach - 1: I can't merge multiple shapefiles and merge into a single .osm file because it's exceeding ...
1
vote
1
answer
2k
views
Getting Leaflet routing control result outside map in a div or table [closed]
All of the examples of Leaflet routing control display the result (iterenary) inside the map area.
I want to display it outside in a div or table element. There is ItineraryBuilder in the API but no ...
0
votes
1
answer
7k
views
How can I change OSRM server with leaflet-routing-machine
I am using leaflet-routing-machine with OSRM, How can I change OSRM server and do not use demo?
I have the same warning:
You are using OSRM's demo server. Please note that it is **NOT SUITABLE FOR ...
1
vote
1
answer
457
views
Issue with osrmIsochrone function in R
I have been using osrm package for a while and didn't ever come across this kind of issue before. It looks so weird and I have been trying to update package and reinstall R as well. But nothing is ...
0
votes
1
answer
186
views
OSRM giving different results
On calling API http://osrm.stackbox.xyz/table/v1/driving/78.4444076,11.6000205;78.5929274,11.5958152, I am getting a 2x2 matrix.
When I put the same coordinates with some more co-ordinates like this: ...
2
votes
1
answer
2k
views
Using OSRM to create isochrones in R potentially problematic at < 10 minutes drive time?
I'm working on creating isochrones in R using osrm, and I keep finding problems with 0-10 minute travel times. Here's some code I've been using to test with a hand-picked test location:
install....
0
votes
1
answer
489
views
Nearest / Fastest Point using OSRM
How can I use OSRM to given a destination and 5 origins. Then OSRM should return the fastest origin, the distance between this origin and the destination and the duration of the route.
Can I do it ...
0
votes
0
answers
720
views
Get Corresponding OSM Node IDS from list of Lat,Long (CSV): Map Matching
I have a list of (lat,lng) coordinates. I want to map match them and get their corresponding OSM node ids? How can i do that using OSRM or any other map matching algorithm?
0
votes
0
answers
255
views
{'code': 'NoMatch'} OSRM API: What does it mean? And how can I avoid it?
I have RAW GPS trackers data, when I match those GPS coordinates to nearest NodeID, it gives me the No Match Error. I am using the following code snippet:
import requests
url = 'http://router....
1
vote
1
answer
2k
views
OSRM foot / walking profile avoiding trunk roads
I have setup OSRM backend and frontend using profiles/foot.lua aka walking profile. The routing works well untill a trunk road (OSM tag: highway=trunk) comes along or between the origin and ...
-1
votes
1
answer
611
views
OSM routing database with high quality data? [closed]
Our company is searching for a routing service which provides free OSM database (high quality routing data) and preferably also considers the traffic parameters (traffic flow, day etc. similar to no-...
1
vote
0
answers
2k
views
Getting distance between route and points around that route?
I have a route between 2 points by means of OSM routing service.
I want to get the distance between route and points around. How can I achieve this?
I created this route by the following example ...
1
vote
0
answers
33
views
Determine left/right based on headings of in & out legs
I'm analyzing roads layer to create navigation layer. Each vector Linestring segment has direction of traffic.
Turn defined as where 2 directional segments meet.
However, I find it challenging to ...
0
votes
0
answers
680
views
How to increase capacity of osrmRoute in osrm package in R
I had plotted the routes of some locations. The maximum number of locations allowed for routing using the OSRM package in R is 100 coordinate points.
How can I extend beyond this restriction?
1
vote
2
answers
938
views
Service Area or Catchment Area in R
I'm trying to find an R package to duplicate a specific bit of functionality of the ESRI network analyst: What ArcMap refers to as 'Service Areas'. Related terms include
catchment areas
isochrones
'...
1
vote
0
answers
632
views
Draw a polyline around a route to act as geofence with leaflet routing machine [closed]
I am using leaflet routine machine to get a route between 2 points. I want to be able to draw an invisible polyline around the route and use this as a geofence and if the user goes out of the bounds ...
0
votes
1
answer
2k
views
Extracting OSRM PBF file using Docker osrm/osrm-backend image?
I have installed Docker Desktop for Windows and I'm trying to extract the California PBF file. My Docker instance has 16 GB of RAM.
Is more RAM needed to extract California?
PS D:\Datasets\...
0
votes
1
answer
1k
views
OSRM Table service returns empty array when I use a HTTP Server
I am currently trying to use OSRM's Table service to get the durations of the fastest routes between two points, to be able to build a time matrix using Python and later use it as a parameter in an ...
5
votes
2
answers
9k
views
Adjust leaflet routing machine draw (animate) route speed
I use leaflet routing machine and it's working fine with me.
Here is my code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<...
4
votes
2
answers
2k
views
Identify OSM road ids based on coordinates
I have a trace of GPS coordinates. I would like to get the OSM road ids of the roads that lie on the route defined by the coordinates.
I've used OSRM match service to match the coordinates to the ...
2
votes
0
answers
78
views
OSRM-extract Sorting edges by start seems to stop
I try to use planet-latest.osm.pbf (2018-05-23) from https://planet.openstreetmap.org/pbf/.
I extract the pbf file on Ubuntu 16.04 and everything seems OK until Sorting edges by start ...
On ...
1
vote
1
answer
1k
views
Generating route from user's current location to desired location on web map created in QGIS?
I am developing a GIS in QGIS and I want to get the user's current location, then according to the user's second point selection, I want to generate a route between these two points. If possible, I ...
0
votes
1
answer
882
views
OSRM how to use my own map
I download a cartography bike from the open data data link to Postgres then I convert it to osm using:
python ogr2osm.py "PG:dbname=x user=x host=localhost" --sql="SELECT * FROM bike_network" --...
3
votes
1
answer
2k
views
OSRM doesn't show actual route while plotting from osrm-backend JSON response
While trying to test routing using OSRM Demo server I sent GET request with the following url:
http://router.project-osrm.org/route/v1/driving/90.4007354,23.7936502;90.3925568,23.7746739?steps=true
...
0
votes
1
answer
1k
views
Generate polygon automatically based on locations
I'm trying to achieve some similar to Draw a polygon automatically through markers (points) in google maps but not exactly.
Given a set of locations I'd like to know if it is possible to generate the ...