Compare commits

...

4 Commits

Author SHA1 Message Date
Adrian 36bdf97a1c Adjust priorities
Normal priority for primary highway to avoid strange routes.
Decrease priority for grade1 tracktype.
2016-07-24 12:17:23 +02:00
Adrian 70e29beb89 Merge branch 'original' 2016-07-24 11:37:56 +02:00
Adrian 463ff95459 Update Readme 2016-04-19 22:16:17 +02:00
Adrian f56493967a Add inline skates mode in routing.xml 2016-04-19 21:45:28 +02:00
3 changed files with 64 additions and 2 deletions

View File

@ -1,3 +1,26 @@
# OsmAnd routing.xml # OsmAnd routing.xml for Inline Skating
Original version This file adds a new option to the bicycle mode
to tweak the routing algorithm for inline skating:
![Inline skates mode](inline-skates-mode.png)
The basic principle is to avoid non-smooth surfaces by all means.
Primary roads can be used, but the algorithm should look for
nicer routes.
It seems to work pretty well, however, beware of steep segments.
Just copy the file to the OsmAnd folder.
Also see a [Google Group discussion](https://groups.google.com/forum/#!topic/osmand/JmMQ0bQV68I).
The original `routing.xml` [is on GitHub](https://github.com/osmandapp/OsmAnd-resources/blob/master/routing/routing.xml).
## Uncertainties
* OSM's [`tracktype`](http://wiki.openstreetmap.org/wiki/Key:tracktype)
and [`smoothness`](http://wiki.openstreetmap.org/wiki/Key:smoothness)
seem to be redundant somehow…
* It seems to be impossible to add a completely new
["application mode"](https://github.com/osmandapp/Osmand/blob/master/OsmAnd/src/net/osmand/plus/ApplicationMode.java)
without programming.

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 KiB

View File

@ -431,6 +431,7 @@
leftTurn="0" rightTurn="0" followSpeedLimitations="false" onewayAware="true" heuristicCoefficient="1.5"> leftTurn="0" rightTurn="0" followSpeedLimitations="false" onewayAware="true" heuristicCoefficient="1.5">
<!-- <attribute name="relaxNodesIfStartDistSmallCoeff" value="2.5"/> --> <!-- <attribute name="relaxNodesIfStartDistSmallCoeff" value="2.5"/> -->
<!-- New ROUTING API --> <!-- New ROUTING API -->
<parameter id="inline_skates_mode" name="Inline skates mode" description="Inline skates mode" type="boolean"/>
<parameter id="avoid_ferries" name="Avoid ferries" description="Avoid ferries" type="boolean"/> <parameter id="avoid_ferries" name="Avoid ferries" description="Avoid ferries" type="boolean"/>
<parameter id="avoid_motorway" name="Avoid motorways" description="Avoid motorways" type="boolean"/> <parameter id="avoid_motorway" name="Avoid motorways" description="Avoid motorways" type="boolean"/>
<parameter id="avoid_unpaved" name="Avoid unpaved roads" description="Avoid unpaved roads" type="boolean"/> <parameter id="avoid_unpaved" name="Avoid unpaved roads" description="Avoid unpaved roads" type="boolean"/>
@ -439,6 +440,38 @@
<way attribute="access"> <way attribute="access">
<select value="-1" t="osmand_change" v="delete"/> <select value="-1" t="osmand_change" v="delete"/>
<if param="inline_skates_mode">
<select value="1" t="bicycle" v="no"/>
<select value="-1" t="highway" v="motorway"/>
<select value="-1" t="highway" v="motorway_link"/>
<select value="-1" t="highway" v="trunk"/>
<select value="-1" t="highway" v="trunk_link"/>
<select value="-1" t="highway" v="footway"/>
<select value="-1" t="inline_skates" v="no"/>
<select value="-1" t="smoothness" v="bad"/>
<select value="-1" t="smoothness" v="very_bad"/>
<select value="-1" t="smoothness" v="horrible"/>
<select value="-1" t="smoothness" v="very_horrible"/>
<select value="-1" t="smoothness" v="impassable"/>
<select value="-1" t="surface" v="unpaved"/>
<select value="-1" t="surface" v="compacted"/>
<select value="-1" t="surface" v="dirt"/>
<select value="-1" t="surface" v="earth"/>
<select value="-1" t="surface" v="gravel"/>
<select value="-1" t="surface" v="fine_gravel"/>
<select value="-1" t="surface" v="grass"/>
<select value="-1" t="surface" v="ground"/>
<select value="-1" t="surface" v="mud"/>
<select value="-1" t="surface" v="pebblestone"/>
<select value="-1" t="surface" v="sand"/>
<select value="-1" t="surface" v="wood"/>
<select value="-1" t="tracktype" v="grade2"/>
<select value="-1" t="tracktype" v="grade3"/>
<select value="-1" t="tracktype" v="grade4"/>
<select value="-1" t="tracktype" v="grade5"/>
</if>
<if param="avoid_motorway"> <if param="avoid_motorway">
<select value="-1" t="highway" v="motorway"/> <select value="-1" t="highway" v="motorway"/>
<select value="-1" t="highway" v="motorway_link"/> <select value="-1" t="highway" v="motorway_link"/>
@ -552,6 +585,12 @@
<select value="0.1" t="barrier" v="debris"/> <select value="0.1" t="barrier" v="debris"/>
<select value="0.1" t="bicycle" v="use_sidepath"/> <select value="0.1" t="bicycle" v="use_sidepath"/>
<if param="inline_skates_mode">
<select value="1.2" t="smoothness" v="excellent"/>
<select value="0.5" t="smoothness" v="intermediate"/>
<select value="1.2" t="tracktype" v="grade1"/>
</if>
<if param="avoid_unpaved"> <if param="avoid_unpaved">
<select value="0.4" t="tracktype" v="grade2"/> <select value="0.4" t="tracktype" v="grade2"/>
<select value="0.1" t="tracktype" v="grade3"/> <select value="0.1" t="tracktype" v="grade3"/>