Giter Club home page Giter Club logo

Comments (8)

richardellison avatar richardellison commented on May 25, 2024

Seems like OSRM running on router.project-osrm.org is returning an extra two variables in each route instruction than is defined in the API. I will put in a fix but will need to look into what the additional two variables mean.

from stplanr.

richardellison avatar richardellison commented on May 25, 2024

Definition is here: https://github.com/Project-OSRM/osrm-backend/blob/543e77b9befa2798621ec07951891c79d47acb4c/descriptors/json_descriptor.hpp

Additional two variables are pre-turn bearing (string) and pre-turn bearing (numeric).

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 25, 2024

It seems the two issues were unrelated (should really be a separate bug report).

Still getting a bug with the second:

Error: lexical error: inside a string, '\' occurs before a character which it may not.
          bA`EqF~LuY~HyUlJw[~M}X~GeSfQo\zUm^z]_j@zl@cfAlh@ev@fe@qq@fEi
                     (right here) ------^ 

Seems like a parsing issue... Any ideas?

Has this been an issue in other languages @bdferris?

from stplanr.

richardellison avatar richardellison commented on May 25, 2024

What are you running to get that error? I tried the example and can't reproduce it.

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 25, 2024
exroutes <- viaroute(50, 0, 51, 1)
viaroute2sldf(exroutes)

Updating various packages now to see if that makes a difference.

from stplanr.

richardellison avatar richardellison commented on May 25, 2024

This seems to be a problem with RCurl not escaping double backslashes with (another two) backslashes so that when jsonlite::fromJSON parses the string (and strips backslashses) you are still left with a double backslash (to match the original OSRM output). In this case it tries to use \z which is not a valid sequence and so fails. I will try to use gsub to add the extra backslash.

from stplanr.

richardellison avatar richardellison commented on May 25, 2024

On testing this I realised that that is actually quite a good example of OSRM as it includes a stretch through the Channel Tunnel but still works.

from stplanr.

Robinlovelace avatar Robinlovelace commented on May 25, 2024

Job done

from stplanr.

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.