logo separator

[mkgmap-dev] Merge areas

From WanMil wmgcnfg at web.de on Mon Apr 25 19:08:57 BST 2011

> Hi!
>
> Did you ever think about merging areas mapped to the same garmin type when they touch?
> I'm thinking about an algorithm that for each zoom level checks, if two areas touch, and when yes merge them when they have the same garmin type.
>
> The motivation: At the moment, areas that are mapped with lots of details can completely go lost in low zoom levels. The detailed areas are removed because they are below the minimum polygon size.
> At these low zoom levels, it can happen that after rounding of the coordinates the areas touch. I think the user would prefer to see the merged area in the low zoom level, when in the higher zoom level the area is almost completely covered with one type.
>
> The algorithm shall probably be only used for landuse types. For other types (building=* for example), it would lead to undesired behaviour (mark in polygons stylefile?).
>
> Cheers,
> Daniel
>

That's definitely worth thinking about it. I expect that it will be hard 
to find a solution with a good performance but maybe it will be easier 
than I expect.

Some things that come to my mind when thinking about it:
* If you merge two touching areas you might create holes in it. In this 
case you have to recut the merged area in two halfs because polygons 
with holes are not supported by the garmin format (no native garmin 
multipolygon available).
* The current multipolygon processing might change its behaviour so that 
it precompiles the mps (decide which polygon is inside the other and 
decide which tags are used). The cut process might be relocated to each 
level creation so that too small inner polygons need not be cut out for 
higher levels.
* Why do you want to use the merge for landuse types only? Why not for 
buildings?

Do you have a short draft how you want to detect that two areas are 
touching?

WanMil






More information about the mkgmap-dev mailing list