logo separator

[mkgmap-dev] special cases with short arcs

From Andrzej Popowski popej at poczta.onet.pl on Tue Sep 24 15:21:09 BST 2013

Hi,

I'm doing similar processing for cgpsmapper. My algorithm is following:

First I try to remove very short lines. I don't remove lines which are a 
part of roundabout, restriction or road sign. I check ending nodes of 
short lines and don't remove lines if any node is external (on tile 
boundary).

I merge nodes and move them to the middle of removed line. But if a node 
connects to multiple short lines, I leave it at original position (this 
is mostly to preserve integrity of network).

Then I try to extend remaining short lines. I move both ending nodes 
unless one of them connects to multiple short lines.

I'm working with floating points coordinates but I round coordinates to 
24-bit equivalent to calculate length. I remove only the shortest lines, 
where difference between ending coordinates is no longer than 1-bit in 
24-bit range. I simply hope there won't be problems like removing whole 
bridge.

I don't know what is real Garmin condition for short line. Cgpsmapper 
uses distance 2.4m. I would rather expect that condition is based on 
24-bit coordinate grid. Would be good to know precisely, when line is 
too short, this would minimize the number of changes.

-- 
Best regards,
Andrzej


More information about the mkgmap-dev mailing list