logo separator

[mkgmap-dev] pink line doesn't draw correctly

From Johann Gail johann.gail at gmx.de on Sat Feb 14 20:25:23 GMT 2009

>> Latest news:
>> I've just discovered, that the error has something to do with the 
>> zoom level!
>> If I zoom out to 120m then the pink line draws correct.
>
>> Also if I zoom in so far that the connection between aa and bb is not 
>> visible on the screen, then the line drawing is correct.
>
> The theory is that at high zoom level, the route is drawn using the 
> highest detail data from the polylines in TRE/RGN, which is linked to 
> the routing graph via "extra bits" and NET.
>
> At low zoom levels, the route is drawn using just the data in NET/NOD 
> ("level 1" in GDF, see http://libgarmin.wiki.sourceforge.net/Contribute).
>
It seems, the error occurs only in very rare conditions:

+ Node in osm
O Node in Routing graph
The pink line should go through 6,2,1,7


                           |8
         5   4   3   2   1 |
dead end---+---+---O---+---O
                   |       |
                   |6      |7
                   |
                   O

The error occurs only if segment 2 is to be drawn.
The error occurs not if...
... if I zoom out enough, that segment 2 is only ~4 pixels long
... if I zoom and move the screen, so that segment 2 is off the screen
... if I generate a new map with an additional routing node between 2 and 1
... if there is a end node at the dead end (from mark)
... if the direction of the way is inverted (from mark)
... if routing starts or ends in segment 1 or 2

As far as I understand the situation, the drawing algortihm has problems 
to find the correct segments to draw pink. If it has to draw all 
segments between two routing nodes (e.g. 1 and 2) then it will draw also 
3,4,5. Seems like some search function didn't stop when it should. Maybe 
the node between 2 and 3 should have some special flag set.

I will stop further investigation for now and will try the newest commits.



More information about the mkgmap-dev mailing list