MBTileMakerViewer
Mobile devices require, and even desktop programs benefit from, maps that are divided into tiles for rapid and memory-efficient display across a huge range of scales. A very popular map tiling format is MBTiles, which was originally developed by Mapbox. My programs GMDE and GMDE Lite, as well as all GIS programs and mobile apps, can use MBTiles maps.
MBTileMakerViewer is, as the name says, a desktop app for making MBTiles files out of any raster map, as well as for viewing MBTiles files you may have received from others. The program has a very nice user manual, which you can access from the Help menu.
Version History
v. 1.8.1 — 2025.03.08
FIXED: In the Windows and Linux versions, the georeferencing listbox inadvertently hid the Datum popup menu. This has been fixed
FIXED: A crash that could occur with very large maps.
FIXED: An unnecessary and incorrect message box that would appear when opening a map in teh southern hemisphere with a world file in UTM coordinates.
v. 1.8.0 — 2025.03.02
NEW (Mac version only): The warped map image now appears on top of an Apple Maps satellite view by default. You can adjust the transparency of the displayed image and zoom in and out so that you can visually check the accuracy of the warping. The Apple Maps background can be toggled on or off with a simple check box in the upper left corner of the window. Unfortunately, Apple Maps cannot be displayed in the Windows or Linux versions of the app.
IMPROVED: You can now enter longitude and latitude values in the georeferencing list box in either decimal degrees OR in degrees, minutes, and seconds (DMS). If you are entering in DMS, you do not need to include the symbols °, ‘, “ and just about any format will work. For example, a latitude can be entered as 20 55 30 S or 20° 55’ 30”S or -20.925 or 20 55.5 s or even 20.925 S. The hemisphere letters are not case sensitive and you can, but do not need to, put a space between the letter and the numbers; the hemisphere letter does need to come last, however. With apologies to users outside the English-speaking world but only E, W are accepted for eastern and western hemispheres (longitude) and N, S for northern and southern hemispheres (latitude). Once you finalize your entry by hitting the tab key, the enter key, or by clicking outside of the row, the latitude or longitude will automatically be converted to decimal degrees with a negative value indicating the western or southern hemisphere.
v. 1.7.1 — 2025.02.25
NEW: A more accurate option for warping images with a world file. When you choose to warp an image with a world file, you will be asked if you want to use the faster or more accurate method. The faster method, which uses the auto-generated control points, is about 3x faster (for UTM images) or 2x faster for images in a geographic projection, but at the corners of the image can be off by meters to, in the case of large map areas, tens of meters. The accurate method is quite accurate across the entire image but, of course, takes longer.
IMPROVED: Dragging and zooming the MBTiles image now works like the other images.
IMPROVED: The progress bar shown during warping is somewhat more accurate.
FIXED: If you warped and tiled a second map after successful completion of the first, the second tiled map would not show up until you switched tabs in the MBTiles pane. This has now been fixed in v. 1.7.1.
v. 1.6.0 — 2025.02.21
NEW: Basic image processing tools for enhancing the warped map before turning it in to an MBTiles file. The tools include contrast, exposure, levels, sharpening, and the ability to pick a color to be partially or completely transparent.
IMPROVED: Dragging and zooming behavior, especially at small zoom amounts. Note that you now have to click within the map image in order to drag it and the mouse has to be hovering over the map image in order to use the scroll wheel.
FIXED: A bug that would yield the wrong coordinates when the warped map was cropped.
v. 1.5.0 — 2025.02.14 — Valentine’s Day edition!
NEW: You can now enter more than 3 control points. The app now uses a least squares best fit matrix inversion to determine the best fitting coefficients of the transformation matrix. After you’ve entered the first three control points, select Georeference>Add Another Point each time you want to add an additional control point.
NEW: Crop either your original map (before or after assigning control points) or your warped map so that your MBTiles file includes just the area you are interested in. No sense tiling parts of the map that you don’t want!
NEW: Set the color and transparency of the padding pixels used around the margin of the warped map. The default color is black but you can make the pixels white or any other color to blend in with the rest of the map. Making the pixels completely transparent is especially useful if you intend to save the MBTiles file in PNG format (which preserves transparency, unlike JPEG). When you overlay the map on a different base map in GMDE, the underlying base map will show through the transparent padding pixels.
IMPROVED: When showing, Apple Maps in the Mac version now shows the pins for the control points of the map you are georeferencing even if you are typing in longitude and latitude values instead of clicking on Apple Maps. NOTE: the value you type in is recorded when you have finished editing both longitude and latitude cells.
UPDATED: The user manual to reflect the above changes.
v. 1.0.1 — 2025.02.08
Minor interface refinements, especially to the MBTile map panel.
v. 1.0.0 — 2025.02.05 First public release!
Please read the manual for functionality. MBTileMakerViewer can read any map in TIFF, JPEG, or PNG format. If your map has an accompanying “World File” the app will use that to georeference the file. Otherwise, you will have to identify three points of known longitude and latitude on the map in order to georeference it.
Once georeferenced, you will warp the map to a Spherical Mercator projection which virtually all map tiles use. The Users Manual gives a good explanation of this projection and has a handy table to show you the relationship between zoom levels, equivalent paper maps scales, and resolution in meters per pixel. Once georeferenced, the app will use a simple and (relatively) speedy affine transformation with nearest neighbor interpolation to perform the warp. If your image requires more complicated warping, you will have to use some other program, at least until I get around to implementing higher order warps in a subsequent version. My experience is that this simple approach works very well in most cases.
After warping, simply choose File>Save as MBTiles File. to save your file.
Once a map is georeferenced, or if you have opened an MBTiles file that you already have, you can measure distances and azimuths on the map if you want.
That’s it: it’s pretty simple compared to the available alternatives!