logo separator

[mkgmap-dev] shape merger in high-prec-coord branch

From Gerd Petermann gpetermann_muenchen at hotmail.com on Tue Jan 14 20:46:19 GMT 2014

Hi all,

today I've finished the work on the shape merger.
The algo works quite simple:
1) if two similar shapes (same type, name, min+max resolution) share
one or more identical points, both are combined.
In the combined shape, the longest sequence of identical points is removed.
This reduces the number of points and the number of shapes.
On the other hand, it makes shapes larger, so that it is more likely that
many smaller landuse=forest shapes are combined and appear at
lower resolution levels.

2) After merging, all points on (almost) straight lines are removed.
This reduces again the img size and has a very nice side effect:
Connected buildings look much better.
Two screen shots show what I mean:
Area in OSM:
http://www.openstreetmap.org/node/21030850#map=17/53.06636/8.79033
Screenshots:
http://files.mkgmap.org.uk/download/170/r2961.png
http://files.mkgmap.org.uk/download/171/r2966_mergeshapes.png

I see no big change in the runtime , I guess the additional cpu time that is needed for the
merged is gained back because less data is written, the img size is 2-3% smaller
compared to trunk.

Any feedback is welcome.

Gerd


 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140114/f0e5aef4/attachment.html>


More information about the mkgmap-dev mailing list