Git Product home page Git Product logo

Comments (4)

rabidllama avatar rabidllama commented on July 30, 2024 1

OK, I have looked into this and the returning errors is indeed a bug which should be fixed shortly. However, the continue_straight option is not intended to tell the engine that it cannot backtrack on itself, more that it should try not to. As such, if a via point does invoke a u-turn, the engine will try and find an alternative that wouldn't back track. In the second example provided however, because the alternative would create a massive detour, the engine will still do the back tracking (in the second example, there is actually no way based on the data to get between the 3rd and 4th points without backtracking).

So in summary, the continue_straightoption does not rule out u-turns, it just gives a much higher weighting to those route segments. If however the alternative route segment is much longer (for example) then it could easily have an even higher weighting and so the engine will pick the first option which has a u-turn in it.

from openrouteservice.

realthargor avatar realthargor commented on July 30, 2024

A bit clarification perhaps. I tried to use it with foot_hiking and always got an 500 error as result.

https://api.openrouteservice.org/directions?coordinates=172.78333%2C-34.45366%7C172.7843%2C-34.45384%7C172.78567%2C-34.45513%7C172.78782%2C-34.45513%7C172.79071%2C-34.45503&profile=foot-hiking&preference=recommended&units=m&geometry=true&geometry_format=geojson&geometry_simplify=false&instructions=false&elevation=true&extra_info=surface&api_key=xxxx&continue_straight=true

https://api.openrouteservice.org/directions?coordinates=175.32463%2C-38.72576%7C175.32784%2C-38.72752%7C175.35013%2C-38.72162%7C175.35266%2C-38.71884&profile=foot-hiking&preference=recommended&units=m&geometry=true&geometry_format=geojson&geometry_simplify=false&instructions=false&elevation=true&extra_info=surface&api_key=xxxx&continue_straight=true

Expected behaviour would be that a 500 is returned only if the resulting route has a uturn at a waypoint, resulting in backtracking parts of the way.

Currently with missing intersections between footpaths you can get hiking routes with uturns and factor 2-5 times the direct of a direct route between the waypoints.

from openrouteservice.

TimMcCauley avatar TimMcCauley commented on July 30, 2024

@realthargor we are looking into this.

from openrouteservice.

TimMcCauley avatar TimMcCauley commented on July 30, 2024

👍

from openrouteservice.

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.