Git Product home page Git Product logo

Comments (13)

rCarto avatar rCarto commented on May 25, 2024

This is not possible in osrm yet. OSRM server allow to pass several points in the route service.

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

Thanks @rCarto.

I have two questions, and I would appreciate if you can get me answers to the best of your knowledge.

Is it possible to plot road routes which are on osrm using leaflet or mapview?
How do I extend the number of co-ordinates to be routed over 100 points on osrm

from osrm.

rCarto avatar rCarto commented on May 25, 2024
  1. A simple example to plot routes with mapview:
library(osrm)
# Travel path between points between points - output a SpatialLinesDataFrame
route <- osrmRoute(src = c("A", 13.43853, 52.47728),
                   dst = c("B", 13.32247, 52.48882),
                   sp = TRUE, overview = "full")
library(mapview)
mapview(route)

Displaying the underlying OSRM road network is not possible. You can have a look at the osmdata package.

  1. Getting routes with via points implies modifying the code of the osrmRoute() function. I'll have a look into that feature as soon as possible.

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

@rCarto I had plotted the routes of some locations. The maximum number of locations allowed for routing using the OSRM is 100 coordinate points.

Kindly let me know if you get some findings on expanding this restriction.
Thanks

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

@rCarto I had plotted the routes of some locations. The maximum number of locations allowed for routing using the OSRM is 100 coordinate points.

Kindly let me know if you get some findings on expanding this restriction.
Thanks

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

I don't know how the R studio module works. If it's making requests to the OSRM demo server at https://router.project-osrm.org/, then you'll need to learn how to install and build OSRM separately, then run osrm-routed with the option I posted above.

_Originally posted by @danpat in Project-OSRM/osrm-backend#5421 (comment)

@rCarto What do you think of this?
I think there's a way here. Do you think you can make this happen?

from osrm.

rCarto avatar rCarto commented on May 25, 2024

The osrm package use an OSRM server. The default server has limitations. You can run your own instance of OSRM server (via docker) with the described options to get rid of the limitations and make osrm package use your server.

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

That’s why I reached out to you @rCarto.
How can I get this done using R

from osrm.

rCarto avatar rCarto commented on May 25, 2024

As stated in the documentation, to change the OSRM server, change the osrm.server option:

options(osrm.server = "http://address.of.the.server/")

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

Thanks @rCarto I got osrm to work using the local host. I can now use the osrmTablefor more than 100 coordinate points but I have concerns about osrmTrip because I still get errors of The OSRM server returned an error: Error: TooBig Too many trip coordinates when I try to use in for analysis greater than 100 coordinates.
I need help please.

from osrm.

rCarto avatar rCarto commented on May 25, 2024

Hmm, there may be an other option to set on the server side. I would search on the OSRM engine documentation.

from osrm.

Anyaoha avatar Anyaoha commented on May 25, 2024

I have set it already. Thanks

For those who would like to get solution from my experience.
Here's how I got it done.
osrm-routed --max-trip-size X map.xml.osrm where X is the size you'd like to use.

from osrm.

rCarto avatar rCarto commented on May 25, 2024

version 3.3.2 should address the original question

from osrm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.