Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yourscar routing broken because yournavigation.org is (permanently) down #116

Closed
omeckman opened this issue Feb 26, 2021 · 4 comments
Closed

Comments

@omeckman
Copy link

omeckman commented Feb 26, 2021

Hello,

see https://forum.openstreetmap.org/viewtopic.php?id=735&p=11

It seems the original owner of this service isn't responding anymore.

I understand this has nothing to do with Viking itself, but i read it is wanted to have a working default routing service in Viking.

Maybe there is a quick fix to get it to work with router.project-osrm.org or some other service?

I came as far as adding this to the routing.xml:

<object class="VikRoutingWebEngine">
    <property name="id">osrm</property>
    <property name="label">OSRM</property>
    <property name="format">???</property>
    <property name="url-base">http://router.project-osrm.org/route/v1/driving/</property>
    <property name="url-start-ll">%s,%s</property>
    <property name="url-stop-ll">;%s,%s</property>
    <property name="url-via-ll">;%s,%s</property>
</object>
@rnorris
Copy link
Collaborator

rnorris commented Feb 26, 2021

The brouter option should be available and still working.

Regarding OSRM, sadly they removed GPX format support ages ago:
Project-OSRM/osrm-backend#1180
(So the OSRM option was removed in Viking)

So now the only have their output in JSON, which IIRC isn't any particular schema.
However if it is GeoJSON then with the current releases of GPSBabel should might work - try geojson for the format
(Since VikRoutingWebEngine passes returned results to GPSBabel to convert into something Viking can understand).

https://www.gpsbabel.org/htmldoc-1.7.0/fmt_geojson.html

If it is not GeoJSON, then specific code is needed to interpret the JSON returned. Unfortunately the above OSRM service doesn't seem to be working at the moment, so I can not check. NB probably better to use 'https' rather than just 'http' in the url-base.

Also the last time I looked there is some potential routino servers - but maybe per country only.
See https://sourceforge.net/p/viking/discussion/general/thread/9ddcea4bba/

@omeckman
Copy link
Author

geojson format did not work, I just don't get any console output when trying to create a route, would have to dig into the source code, but changing the profile from hiking-beta to car-fast in the brouter default profile did the job for me, works just as yourscar worked before (as far as I can see).

As a casual Viking user not into the depths of GIS software, in my mind, I somehow discarded brouter as the hiking version of routing without taking a closer look :)

  <object class="VikRoutingWebEngine">
    <property name="id">brouter</property>
    <property name="label">brouter</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-fast&amp;alternativeidx=0&amp;format=gpx</property>
    <property name="url-start-ll">&amp;lonlats=%s,%s</property>
    <property name="url-stop-ll">|%s,%s</property>
    <property name="url-via-ll"></property>
    <property name="url-ll-lat-first">FALSE</property>
  </object>

Thank You

@rnorris
Copy link
Collaborator

rnorris commented Feb 28, 2021

Yes sadly the geoson option doesn't work 'out of the box'.

However this has prompted me to have another look at the OSRM output, which with some specific code and modifications to the request - I now have a provisionally working solution - which I will seek to push to the mainline code base in the next few days after some tidy up and more testing.

I'm glad you've been able to use the configurable methods to get a different brouter profile to work.

rnorris added a commit to rnorris/viking that referenced this issue Mar 4, 2021
Move brouter to top (i.e. to become the default) and add a brouter car profile option.
NB Yours options not removed yet; there is potential the service may get restored.
rnorris added a commit that referenced this issue Mar 10, 2021
Move brouter to top (i.e. to become the default) and add a brouter car profile option.
NB Yours options not removed yet; there is potential the service may get restored.
@rnorris
Copy link
Collaborator

rnorris commented Mar 11, 2021

The latest code now has capability to process the JSON returned by OSRM services.

See commit - 0bf136e

@rnorris rnorris closed this as completed Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants