logo separator

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

From WanMil wmgcnfg at web.de on Tue Jan 14 21:05:12 GMT 2014

Hi Gerd,

that sounds great!!

The description of the algorithm sounds quite easy. I like it!
Maybe it could also be used to improve cutting in the Multipolygon class?
How do you avoid that two shapes connected with two edges and that 
surround a hole are merged? I think many shapes cut by the 
MultipolygonRelation have this characteristic.

WanMil

> 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
>
>
>
>
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
>



More information about the mkgmap-dev mailing list