logo separator

Now mkgmap has a real overview map

31
May

Earlier today, mkgmap developer Gerd Petermann merged his changes to create a proper overview map into trunk. Update now or go and get version r2636 or later from the download page.

This is an important feature that has been missing from mkgmap for a long time. The overview map exists to display a low resolution map of the whole area of a set of map tiles.

Although there has always been an overview map, as it is essential to displaying in MapSource or BaseCamp, it has been empty apart from the polygons that show the area covered by each tile in the map.

There was another problem: to compensate for the lack of an overview map most map styles, including the default one, contained extra map levels so that the map was still visible when zoomed out to the scale of regions and countries. This extra data made the map slower when scrolling on GPS devices.

So the change has a double benefit; the map is still visible when zoomed out far enough to show whole countries and continents and can also be faster to scroll on GPS

The new enhanced overview map will be automatically generated when creating a map without having to make any changes. There are however a couple of new options to control what happens.

--overview-levels
like levels, specifies additional levels that are to be written to the overview map. Counting of the levels should continue. Up to 8 additional levels may be specified, but the lowest usable resolution with MapSource seems to be 11.
--remove-ovm-work-files
If overview-levels is used, mkgmap creates one additional file with the prefix ovm_ for each map (*.img) file. These files are used to create the overview map. With option --remove-ovm-work-files=true the files are removed after the overview map was created. The default is to keep the files.

Further improvements

In addition to the overview map, there is also a slew of improvements and bug fixes that have been added.

Fixes

There are fixes for maps that cover a large portion of the globe or extend to 180 degrees longitude.

  • fix wrong interpretation of 0x800000 as -180.0 degrees for maxLon
  • fix treatment of very long lines that cross the planet

Optimizations

  • The polygon filter allows larger polygons.
  • SeaGenerator generates fewer "sea-only" and "land-only" polygons when precomp-sea is used.

Both reduce the img size, esp. for maps containing large sea only areas.

An option to better control the minimum size of a polygon that can now be configured per level.

--polygon-size-limits=limits-code
Allows you to specify a different min-size-polygon value for each resolution. For example:
  --polygon-size-limits="24:12, 18:10, 16:8, 14:4, 12:2, 11:0"

If a resolution is not given, mkgmap uses the value for the next higher one. For the given sample, resolutions 19 to 24 will use value 12, resolution 17 and 18 will use 10, and so on. Value 0 means to skip the size filter. Note that in resolution 24 the filter is not used.

Changes regarding styles

  • The support for the obsolete map-features.csv file was removed.
  • Level ranges can now use min-max or max-min
  • There is now an option --check-styles which will flag issues in the style that are known to cause problems.

Other changes

  • A few checks are performed regarding the plausibility of the given options and input files to help beginners.
Posted by steve on 31 May 2013

Latest commits

  • splitter-r654 - add note that splitter doesn't handle holes in *.poly files.
    05 apr 2024
  • mkgmap-r4919 Avoid possible integer overflow in blocksize calculation when gmapsupp contains large number of tiles.
    04 apr 2024
  • mkgmap-r4918 add surface=chipseal to group of surfaces which means paved.
    06 mar 2024
  • mkgmap-r4917 fix typos in documentation: $LONG_DATE$ -> $LONGDATE$, $SHORT_DATE$ -> $SHORTDATE$.
    18 feb 2024
  • mkgmap-r4916 sortResource_v3.patch (with updated date in comment) by Ticker Berkin.
    13 oct 2023
See more...