logo separator

[mkgmap-dev] Questions regarding routing

From WanMil wmgcnfg at web.de on Fri Jun 7 21:20:54 BST 2013

Hi Gerd,

> Hi,
>
> I try to understand the implementation of the code that creates the road net
> work.
> In 2009 Mark Burton implemented a feature using tags like
> mkgmap:road-speed in the points file.
> See
> http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2009q4/004777.html
>
> Before that Mark also added a feature to handle points with an access tags
> like
> "access", "barrier", or "highway".
>
> I think the code for these features is not correct, it sometimes splits
> roads into short arcs.

What the hell are short arcs? Everybodys talking about but I haven't 
understood so far... :-)

>
> Questions:
> 1) If a road with road_speed=4 has e.g. 10 points (= OSM nodes) , and the
> 3rd point has tag
> mkgmap:road-speed=-1 and the 8th point has tag mkgmap:road-speed=+1,
> what is the expected result?
> I would assume that the road is split into 3 parts, one containining points
> 1-3,
> one the points 3-8, and the last one the points 8-10.
> The 1st part would use the unchanged road_speed value 4, the 2nd part the
> the value 3 and the last part the value 5.
> (if this doesn't introduce any short arcs, else splitting makes no sense for
> these tags)
> Correct?

Having a look at the code I would expect part uses points 1-4, part two 
uses points 4-9 and part 3 9-10. The code splits at i+1:
Way tail = splitWayAt(way, i + 1);

What do I expect? Hhhm, not easy to say. The current splitting does not 
make much sense to me. Having a mkgmap:road-speed=-1 at point 3 of 10 
lowers the speed until the 4th point. Reversing the way lowers the speed 
of the last 7 point (4-10). So the effect of mkgmap:road-speed on a 
point is quite random.
So I would expect that mkgmap:road-speed=1 cuts out point 2-4 with 
lowered speed or it cuts out +-20m to have a cleary defined effect.

>
> 2) If a road with 10 points and access=foot has a 3rd point with
> barrier=bollard, should this
> cause a split of the road so that points 3-10 have access=bicycle?
> I think no.

Me too. See my comment to 1. I expect that a small area (+-1 point or +- 
x meter) around barrier=bollard uses access=bicycle.

>
> 3) If a road with 10 points and access=bicycle has a 3rd point with
> barrier=cycle_barrier, should this
> cause a split of the road (which just seems to increase the img size) ?
> I think no

This leads to the question: is barrier=cycle_barrier passable for 
cyclists? The wiki does not state this clearly.

I guess the barrier handling should be updated because its 
implementation is quite old and the tagging maybe has changed or 
diversified since then.

WanMil




More information about the mkgmap-dev mailing list