How to

Merging MBTiles

Merging MBTiles

This feature is available in PRO version only. It is not part of trial version.

MapTiler can easily merge different maps in MBTiles format. It is also possible to replace a part of one MBTiles with another MBtiles. This feature is quite useful and saves a lot of rendering time in case you receive a new update of source data and you need to replace just few zoom levels with this new part.

Process of merging

Merging utility is available after every rendering of MBTiles or when you open mbtiles file in MapTiler. When you close a preview, in the bottom part of the window you can find 4 buttons. The last one (Merge) will open the merging utility.

mbtiles

The tool has 2 options that affect time of merging and quality of the image. “Start merging” button opens a dialog to choose second file. IMPORTANT information is, that the CHOSEN file ALWAYS REPLACES tiles in CURRENT opened file. In case, there are different zoom levels in different layers, then the result will have zoom levels from both files.

mbtiles

The following example shows the whole world of Blue Marble image in spring (left image) which is merged with a half of Blue Marble winter image. In this case, spring image has to be opened in MapTiler and winter image added via the “Start merging” option.

There are 2 additional options available:

sparse - Fills the empty space between separate maps (if there is some) with empty tiles in background colour. This option can take longer to render, if there are huge areas between maps, as these have to be created. In case the maps overlap each other, there is no extra action involved.

reencode - This option is useful, when the 2 merged maps have different format (e.g. jpeg and png). By default, the result is a hybrid format (combination of both of them). If reencode option is used, the chosen file is encoded to the actual format (which can slow down the process).

mbtiles