logo separator

[mkgmap-dev] [PATCH] alpha patch (V4) for simplifying ways and reducing img size

From Johann Gail johann.gail at gmx.de on Mon Apr 13 12:50:38 BST 2009

>
> Are you still working on this patch?
>
Yes, but at the moment with low priority. The weather is to good, I 
prefer cycling....
Nevertheless find attached the latest revision of my patch. Based on 
R1001 of mkgmap.
> I've tried it out on a number of maps: I could get compression levels 
> similar to what you describe (about a 10% reduction in size). I had 
> also hoped that this would improve display performance of the maps, 
> but I could not detect any noticeable change.
>
Glad to hear someone uses my patch. For me it speeds up redrawing speed 
by factor 2 at low zoom levels (20 and 30km , 50km and lower shows 
basemap).
> On my eTrex when I zoom out to scales of 50 or 80 km, it can take a 
> very long time for the device to draw the map. From my observation of 
> the way the map is drawn, it seems like the highways are drawn segment 
> by segment.
>
Yes, I made the same observation. The highways gets drawn segment by 
segment. Therefore I introduced the switch --merge-lines, which should 
merge the segements.
> As you have stated, a perhaps more effective approach would be first 
> to join highway segments where possible (for example by merging 
> bridges and tunnels, neither of which are displayed by the Garmin 
> devices), and then to apply the Douglas-Peucker algorithm to these 
> longer segments. Do you have any idea how this could be achieved?
>
Yes, use the switch --merge-lines :-)
The line merging algorithm works in general, but could be improved. It 
connects all line endings, which have the same type and name. For 
efficiency reasons it is done by hashlists. I assume, there is some 
error in it, as there the resulting highways are sometimes split in 
segements, but the should be merged.

What I'm thinking about at the moment:
Each highway gets drawn double, as there is a line for each direction. 
It should be possible to merge these both lines into a single one, but I 
don't know an efficient algorithm to achieve this. Has anyone an idea 
for this?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimplifyWayV4.patch
Type: text/x-patch
Size: 20531 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090413/e172961a/attachment.bin 


More information about the mkgmap-dev mailing list