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.9.2 — 2025.03.16
NEW: A new menu item, GeoReference>Use GDAL for Warp, allows you to choose whether you want to warp the image using GDAL (if installed) or using MBTMV’s builtin routines for warping using a world file or an affine transformation. About the only reason why you might want to do this is if GDAL is giving you unexpected results or if you want to compare the different methods of warping. If you are doing a comparison, you’ll find that warping with a world file is essentially identical to GDAL’s results whereas the affine transformation may have errors of meters to tens of meters at the corners of the map, depending on the size of the map being warped.
FIXED: a few bugs related to cropping a warped image.
v. 1.9.1 — 2025.03.13
IMPROVED: When GDAL is installed and the original image has builtin georeferencing information, image cropping has been disabled in the Georeferencing tab. This is to prevent loss or invalidation of the georeferencing information. Instead, you can still crop the warped image in the Warped Image tab panel. GDAL warping is fast enough that the time penalty for warping the entire image is minimal.
IMPROVED: When saving the MBTiles file, the maximum zoom level is now set to the highest level permitted by the the overall size of the image. You will not be able to select a higher zoom level.
IMPROVED: Slight modifications to the users manual as well as other minor tweaks.
v. 1.9.0 — 2025.03.12
NEW: MBTilemakerViewer automatically checks to see if you have the free, open source GDAL geospatial libraries installed. If so, when your input map is in geotiff format with full metadata, my app will use GDAL for both extracting the georeferencing data and for warping. You use GeoReference>Show GeoTiff Metadata to examine the full metadata of any geotiff file. GDAL enables MBTileMakerViewer to warp any GeoTiff in any projection and datum extremely accurately to a Spherical Mercator projection. Once installed, the use of GDAL is largely invisible to the user. You do not need to know any command line commands or use the terminal. Installation of GDAL itself does require brief use of the terminal. Note that MBTileMakerViewer is still fully capable of warping maps without GDAL installed. GDAL provides added functionality. You might want to read the new section of the updated User’s Manual (available under the Help Menu) entitled “Should I install GDAL?” which gives different usage scenarios for when you do not need GDAL, you might need GDAL, and you definitely should install GDAL. For example, you will need to have GDAL installed in order to use my app GeoTiff2GridFloat, which will automatically translate Tiff DEMs to GridFloat DEMs.
NOTE: GDAL integration has not been tested on Windows or Linux. The ability of MBTileMakerViewer to find GDAL on your system depends on Whether or not you have set the path and environment variables correctly. See this post on the Mapscaping website for an explanation.
IMPROVED: Updated user’s manual.
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!