Giter VIP home page Giter VIP logo

Comments (3)

rCarto avatar rCarto commented on June 14, 2024

Can you provide a reproducible example please? I don't know what version of OSRM you are using nor what function you are trying to use, and the link to Project-OSRM does not work...

from osrm.

F0rth avatar F0rth commented on June 14, 2024

my bad, I'm using osrm-backend 5.14.2, here the correct link to the doc:
https://github.com/Project-OSRM/osrm-backend/blob/5.14/docs/http.md

launching orsm routing daemon on a subset of osm:
[forth@debian osrm]$ ../../osrm-backend-5.14.2/build/osrm-routed -a mld ./rhone-alpes-171206.osrm
[info] starting up engines, v5.14.2
[info] Threads: 4
[info] IP address: 0.0.0.0
[info] IP port: 5000
[info] load names from: "./rhone-alpes-171206.osrm.names"
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] set checksum: 1297240911
[info] http 1.1 compression handled by zlib version 1.2.8
[info] Listening on: 0.0.0.0:5000
[info] running and waiting for requests
[info] 19-12-2017 21:40:11 1.198ms 127.0.0.1 - 'osrm' R package 400 /v1/driving/5.370536,44.751036;NA,NA;5.452401,44.6151;5.370801,44.660123?steps=false&geometries=geojson&overview=simplified
[info] 19-12-2017 21:40:11 0.058843ms 127.0.0.1 - 'osrm' R package 400 /v1/driving/5.370536,44.751036;NA,NA;5.452401,44.6151;5.370801,44.660123
[info] 19-12-2017 21:40:49 0.063741ms 127.0.0.1 - 'osrm' R package 400 /v1/driving/5.724524,45.188529;4.835659,45.764043?steps=false&geometries=geojson&overview=simplified
[info] 19-12-2017 21:40:49 0.089762ms 127.0.0.1 - 'osrm' R package 400 /v1/driving/5.724524,45.188529;4.835659,45.764043

sample R script:
library('ggmap')
library('sp')
library('rgeos')
library('mapview')
library(osrm)
options(osrm.server = "http://127.0.0.1:5000")
library("knitr")

villes <- c("Grenoble, France", "Lyon, France")
parcours <- data.frame(names= villes)
geocodes <- geocode(as.character(villes))
parcours <- data.frame(parcours, geocodes)
trips <- osrmTrip(parcours)
mapview(trips[[1]]$trip)
table <- osrmTable(parcours)
kable(table$durations)

from osrm.

rCarto avatar rCarto commented on June 14, 2024

You should end the osrm.server address with a "/":
options(osrm.server = "http://127.0.0.1:5000/")

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.