logo separator

[mkgmap-dev] [mp: PATCH] Multipolygon handling - decomposed polygons

From Steve Ratcliffe steve at parabola.me.uk on Sat Jan 9 22:49:42 GMT 2010

Hi

When mkgmap was started relations had not been invented and so I think 
it is very valid to re-think the processing steps and data structures.

Mkgmap is separated in three layers:

1. The reader layer (package ..mkgmap.reader.osm) which deals in 
concepts from osm such as nodes/ways/relations etc.

2. There is the general intermediate layer, which is a full detail 
idealised representation of the map (package ..mkgmap.general) from 
which the individual map layers are derived.

3. The actual Garmin map layers and elements (packages under imgfmt).

I would suggest that we are missing a multi-polygon element in the 
general package.  So instead of converting to the final garmin format 
too early on, keep the full multi-polygon (with separate inner and outer 
parts).  The filter stages would then not need to deal with artefacts 
such as cuts between the inner and outer polygons.

The cuts would then get added when you finally convert to the img format 
elements.

As this is done for each layer separately you could then handle cases 
where you want to suppress the inner polygons altogether (because they 
would be too small for example) more easily as you would just drop it 
and create the outer polygon(s).

..Steve



More information about the mkgmap-dev mailing list