Routing.XML and width and maxwidth

54 views
Skip to first unread message

Tom Schulz-Heise

unread,
Sep 13, 2019, 4:34:53 PM9/13/19
to Osmand
Hello,

did anybody figure out how to modify the routing.xml file in order to consider the width and maxwidth of a road? I would like to avoid with my motor home too narrow roads & bridges.

Modifications I did to routing.xml but the routing does not consider the limitations when set. Attached my modified routing.xml:

This part works properly:
<parameter id="width_max" name="WidthMax" description="Maximum vehicle width to be permitted on the route" type="numeric" values="0,1.49,1.99,2.29,2.49" valueDescriptions="-,1.5m,2m,2.3m,2.5m"/>
<parameter id="width_street" name="WidthStreet" description="Minimum width of street to pass." type="numeric" values="0,1.49,1.99,2.29,4.99,10" valueDescriptions="-,1.5m,2m,2.3m,5m,10m"/>

Changes to the routing engine:
<way attribute="access">
...
  <!--Test values
    Start: 48.78935,8.83382
    End:   48.78947,8.83652
    Limitation: 2.4 m bridge
  -->
  <select value="-1" t="maxwidth">
    <gt value1=":width_max" value2="$maxwidth" type="length"/>
   </select>
           
   <!--Test values
     Start: 49.61909,11.06893
     End:   49.61197,11.12128
     Limitation: 4 m width of street close to 49.61909,11.06893
   -->
   <select value="-1" t="width">
      <gt value1=":width_street" value2="$width" type="length"/>
   </select>

<point attribute="obstacle">
...
  <select value="-1" t="maxwidth">
    <gt value1=":width_max" value2="$maxwidth" type="length"/>
   </select>
           
   <select value="-1" t="width">
     <gt value1=":width_street" value2="$width" type="length"/>
   </select>

routing.xml

Xavier

unread,
Sep 13, 2019, 5:41:56 PM9/13/19
to Osmand
On Fri, Sep 13, 2019 at 01:34:53PM -0700, Tom Schulz-Heise wrote:
>did anybody figure out how to modify the routing.xml file in order to
>consider the width and maxwidth of a road? I would like to avoid with my
>motor home too narrow roads & bridges.
>
>Modifications I did to routing.xml but the routing does not consider the
>limitations when set. Attached my modified routing.xml:

Do the relevant bridges in OSM have maxwidth (and/or maxheight) tags?

If the bridge does not have those values tagged upon it in OSM then
there is nothing OsmAnd can do, the data is simply not present for
OsmAnd to utilize.

Spot checking four bridges near me, all crossing an interstate highway,
shows all four without max width or height tags in OSM.

Same goes for roads, most roads around me also lack width tags.

However, the data being OSM, you can add these tags yourself if you can
collect the relevant values during your travels, then they will be
present for your own use (and everyone else) later.

Tom Schulz-Heise

unread,
Sep 14, 2019, 8:11:24 AM9/14/19
to Osmand
Hello Xavier,

I did the test with a maxwidth tag. E.g. the bridge

For maxheight it is working. I did the test with a road close to me:

As written earlier maxwidth and width are not working...

Best regards,

Tom

Xavier

unread,
Sep 14, 2019, 9:44:47 AM9/14/19
to Osmand
On Sat, Sep 14, 2019 at 05:11:24AM -0700, Tom Schulz-Heise wrote:
>Am Freitag, 13. September 2019 23:41:56 UTC+2 schrieb Xavier:
>> On Fri, Sep 13, 2019 at 01:34:53PM -0700, Tom Schulz-Heise wrote:
>> >did anybody figure out how to modify the routing.xml file in order to
>> >consider the width and maxwidth of a road? I would like to avoid with my
>> >motor home too narrow roads & bridges.
>> >
>> >Modifications I did to routing.xml but the routing does not consider the
>> >limitations when set. Attached my modified routing.xml:
>>
>> Do the relevant bridges in OSM have maxwidth (and/or maxheight) tags?
>> ...
>> Same goes for roads, most roads around me also lack width tags.
>
>I did the test with a maxwidth tag. E.g. the bridge
>https://www.openstreetmap.org/way/26936358
>
>For maxheight it is working. I did the test with a road close to me:
>https://www.openstreetmap.org/way/47577790
>
>As written earlier maxwidth and width are not working...

In which case it does look like an OsmAnd issue (either a bug or an
unimplemented feature). Therefore you should file a bug report and/or
feature request on the OsmAnd Github issues page at:
https://github.com/osmandapp/Osmand/issues

This group here is users helping users, and while sometimes a developer
does drop by, the github issues page is where the bugs and feature
requests are actually tracked.

Reply all
Reply to author
Forward
0 new messages