Merge tilesets (raster MBTiles)
MapTiler Engine can merge multiple tilesets into one. This is especially helpful when you need to:
- Optimize large data processing. For example, when creating a global tileset, you can render each country into a separate tileset and then merge all tilesets into the final one. If something goes wrong, you only need to re-render a smaller part of the data.
- Update your tilesets with new data. Simply use the new data to create a new tileset, and then merge it with the original (bigger) tileset. That way you can replace the outdated part of the original tileset with the new data, and save a lot of rendering time.
- Extend your tilesets. You can process your map data right after collecting it, and you still have the flexibility to add more regions into the same tileset later. Similarly, you can extend the bounding box of your tiles by merging two partially overlapping maps into one bigger map that covers a larger area.
This page explains how to merge tiles using the visual interface of MapTiler Engine. Merging is also available in CLI, so if you have the CLI feature included in your MapTiler Engine license, you can use the command line utility instead.
Before you start
Before you start merging, make sure that MapTiler Engine is installed and your tilesets are in the right format.
If your tilesets are in a different format than MBTiles, or if they’re generated by a 3rd party tool, convert them to MapTiler MBTiles first.
Convert your tiles to MapTiler MBTiles
For compatibility reasons, we recommend that you only merge tiles created with MapTiler Engine. 3rd party MBTiles, even if they’re fully compliant with the specification, may have slight differences in the internal file structure. This means that the merge might work, but we cannot guarantee the results. So, before merging, please convert any 3rd party MBTiles with MapTiler Engine. Follow How to create tiles from raster data for the general process, using your 3rd party MBTiles file as input and selecting the MBTiles format as output.
Merge your tilesets
MapTiler Engine walks you through the merging process, so you won’t get lost. Here’s the steps:
-
Open MapTiler Engine. Click on the options button in the top right corner and select Merge tilesets.
-
Upload your data and check the preview. If the data overlap, use the arrows in the list to adjust their visibility. The top-most file is the top-most in the output (covers everything underneath). If you’re updating one tileset with new data from another tileset, make sure that the up-to-date tileset is on top.
If the zoom levels in your tilesets don’t match, you’ll get a zoom levels inconsistency warning. It’s technically possible to merge tilesets with different zoom levels, and it might be the desired thing to do, for example when you want to combine satellite imagery on lower zoom levels with drone imagery on higher zoom levels. However, you need to make sure that the tilesets are prepared for a seamless merge, don’t skip a level etc., otherwise the result won’t work well.
In short, we give you a heads-up and if you proceed, we expect that you know what you’re doing.
-
In Output settings, select the output image format. You can keep the original format, or convert your tiles to a new format.
If your tilesets contain a combination of JPG and PNG, MapTiler Engine also makes it possible to keep both formats, for example if you need to use PNG for transparency and JPG for compression (smaller size). However, this is against the MBTiles specification and can cause problems in map viewers that expect a single tile format. For this reason, we recommend that you always select one output image format only.
-
In Upload options, select where to upload the final file. You can either upload it to your MapTiler account where you’ll find your output on the Tiles page, or to your own private cloud such as Amazon. If you only want to save the tileset locally, select Skip upload.
After going through all the settings, MapTiler Engine automatically starts the merge process. Once finished, check the result: Go to menu Options and select Output preview.