logo separator

[mkgmap-dev] custom background polygon in overview map

From Steve Ratcliffe steve at parabola.me.uk on Mon Mar 7 21:06:03 GMT 2011


> I have noticed that mkgmap creates rectangles in overview map even if
> maps contain regions with irregular shapes. These are defined as 0x4b
> background polygons in .mp files. Background polygons were compiled
> correctly into individual (numbered) .img files, but 0x4a definition
> areas in overview map did not follow background shapes.

Thanks, this is a useful improvement.

> gives the rectangle. FileInfo can't read background shape from .img
> file. I had to find a way for transferring background polygons from
> MapMaker to TdbBuilder.

However this will not work if you are using .img files as input, which
is often the case.  The background should really be on the FileInfo.

There is code that can read from the .img file. It currently only
reads lines and points but could be extended to read polygons too.
See MapReader and in particular RGNFileReader.  I realise this is a
much bigger task and probably slower.

> reader/overview/OverviewMapDataSource.java assigns more detailed levels
> for overview map

I don't think this change would work with most .osm maps. A patch
that made the overview map levels configurable (from the .mp file
and/or command line) like for the main map would be great though.

Best wishes

More information about the mkgmap-dev mailing list