Viking i motors de rutes

Ens trobem amb la versió del Viking-Gps 1.7 de linuxmint que l’únic motor que funciona és el ‘brouter’ que està amb el perfil bicicleta.

Podem afegir més motors de la manera següent:

cat >>~/.viking/routing.xml <<EOF
<objects>
  <object class="VikRoutingWebEngine">
    <property name="id">yourscar</property>
    <property name="label">Yours: Car</property>
    <property name="format">kml</property>
    <property name="url-base">http://www.yournavigation.org/api/1.0/gosmore.php?format=kml</property>
    <property name="url-start-ll">&amp;flat=%s&amp;flon=%s</property>
    <property name="url-stop-ll">&amp;tlat=%s&amp;tlon=%s&amp;v=car&amp;fast=1&amp;layer=mapnik</property>
  </object>

  <object class="VikRoutingWebEngine">
    <property name="id">yoursbikefoot</property>
    <property name="label">Yours: Bicycle/Foot</property>
    <property name="format">kml</property>
    <property name="url-base">http://www.yournavigation.org/api/1.0/gosmore.php?format=kml</property>
    <property name="url-start-ll">&amp;flat=%s&amp;flon=%s</property>
    <property name="url-stop-ll">&amp;tlat=%s&amp;tlon=%s&amp;v=bicycle&amp;fast=1&amp;layer=mapnik</property>
  </object>

  <object class="VikRoutingWebEngine">
    <property name="id">brouter</property>
    <property name="label">brouter-hiking-beta</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=hiking-beta&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>

  <object class="VikRoutingWebEngine">
    <property name="id">broutercarfast</property>
    <property name="label">brouter-carfast</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>

  <object class="VikRoutingWebEngine">
    <property name="id">broutercareco</property>
    <property name="label">brouter-careco</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&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>

  <object class="VikRoutingWebEngine">
    <property name="id">broutercartollfree</property>
    <property name="label">brouter-car-tollfree</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&amp;alternativeidx=0&amp;avoid_toll=1&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>  

  <object class="VikRoutingWebEngine">
    <property name="id">broutercarsecondary</property>
    <property name="label">brouter-car-secondary</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&amp;alternativeidx=0&amp;avoid_toll=1&amp;road_restriction=5&amp;avoid_motorways=1&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>  

  <object class="VikRoutingWebEngine">
    <property name="id">broutercarsecondary1</property>
    <property name="label">brouter-car-secondary1</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&amp;alternativeidx=1&amp;avoid_toll=1&amp;road_restriction=5&amp;avoid_motorways=1&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>  

  <object class="VikRoutingWebEngine">
    <property name="id">broutercarsecondary2</property>
    <property name="label">brouter-car-secondary2</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&amp;alternativeidx=2&amp;avoid_toll=1&amp;road_restriction=5&amp;avoid_motorways=1&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>  

  <object class="VikRoutingWebEngine">
    <property name="id">broutercarsecondary3</property>
    <property name="label">brouter-car-secondary3</property>
    <property name="format">gpx</property>
    <property name="url-base">http://h2096617.stratoserver.net:443/brouter?nogos=&amp;profile=car-eco&amp;alternativeidx=3&amp;avoid_toll=1&amp;road_restriction=5&amp;avoid_motorways=1&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>  

<object class="VikRoutingWebEngine">
    <property name="id">graphhoppercar</property>
    <property name="label">Graphhopper car</property>
    <property name="format">gpx</property>
    <property name="url-base">https://graphhopper.com/api/1/route?</property>
    <property name="url-start-ll">point=%s,%s</property>
    <property name="url-stop-ll">&amp;point=%s,%s&amp;vehicle=car&amp;debug=false&amp;key=[YOURAPIKEY]&amp;type=gpx&amp;gpx.waypoints=false&amp;gpx.route=false</property>
    <property name="url-via-ll"></property>
    <property name="referer">Viking GPS</property>
  </object>
  <object class="VikRoutingWebEngine">
    <property name="id">graphhopperracingbike</property>
    <property name="label">Graphhopper racing bike</property>
    <property name="format">gpx</property>
    <property name="url-base">https://graphhopper.com/api/1/route?</property>
    <property name="url-start-ll">point=%s,%s</property>
    <property name="url-stop-ll">&amp;point=%s,%s&amp;vehicle=racingbike&amp;debug=false&amp;key=[YOURAPIKEY]&amp;type=gpx&amp;gpx.waypoints=false&amp;gpx.route=false</property>
    <property name="url-via-ll"></property>
    <property name="referer">Viking GPS</property>
  </object>
  <object class="VikRoutingWebEngine">
    <property name="id">graphhopperfoot</property>
    <property name="label">Graphhopper foot</property>
    <property name="format">gpx</property>
    <property name="url-base">https://graphhopper.com/api/1/route?</property>
    <property name="url-start-ll">point=%s,%s</property>
    <property name="url-stop-ll">&amp;point=%s,%s&amp;vehicle=foot&amp;debug=false&amp;key=[YOURAPIKEY]&amp;type=gpx&amp;gpx.waypoints=false&amp;gpx.route=false</property>
    <property name="url-via-ll"></property>
    <property name="referer">Viking GPS</property>
  </object>
</objects>
EOF

3 thoughts on “Viking i motors de rutes

  1. Sergi,
    Pots aclarir-me per què serveix això? No sé a quina eina de Viking es refereix i què fa.
    Gràcies!

  2. Hola Josep,

    Això és configura en el menú Preferences -> Routing

    Son algorismes per crear automàticament les rutes entre dos o més punts del mapa en base a una sèrie de característiques prèviament definides. (si és un cotxe, moto, a peu, bicicleta etc…)

    Cadascun té la seva configuració i requereix de connexió a internet ja que son serveis externs.

    Al mapa s’ha d’afegir la capa TrackWaypoint i utilitzar l’opció Router Finder.

    Nota: Sembla que la web de Yournavigation ja no està disponible.
    Salutacions

Comments are closed.