logo separator

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

From Johann Gail johann.gail at gmx.de on Fri Feb 27 14:43:16 GMT 2009

Ok, here follows V3 of my patch. Needs some small code cleanup but works 
fine for now.

I've now moved the code into the filter framework.

First I've split up the SmoothingFilter into a SizeFilter and a 
SmothingFilter, as I consider the size filtering an task, which had 
nothing to do with the smoothing.

Second I replaced the SmoothingFilter with the DouglasPeuckerFilter class.

This does a much more convienient job at straightening out lines. For my 
test case it reduces the file size to 90% of the original one.

> Well, I think you have to have a means of disabling it. Whether it is
> enabled by default or not doesn't worry me too much (however, I do
> think that by default, the map data should be frigged as little as
> possible).
>
>   
The parameter is called --reduce-point-density=num. Without a given 
value it takes 2.6, which should lead only to invisible changes.
>> Would it make sense to do a simplification per level let's say 24 bits
>> - 10m, 23 bits 20 meters, and so on ?
>>     
>
>   
The allowed error distance gets shifted with the levels, so at lower 
zooms the filtering reduces more points.

Problem at very low zoom levels is, that the MapLines becomes to short, 
soo a huge amount of short lines gets to be drawn. It would be very 
reasonable to merge the lines before straightening them out.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SimplifyWays_V3.patch
Type: text/x-patch
Size: 11928 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090227/f16a600d/attachment.bin 


More information about the mkgmap-dev mailing list