- Python (included on OSX and Linux)
Clone the repository
git clone git://github.com/mapbox/raster2mb.git
Add raster2mb to your PATH and make it executable.
raster2mb raster_merc.tiff raster_merc.mbtiles
If GeoTIFFs are in projections other than
EPSG:900913 (as many are), run gdalwarp first:
gdalwarp -t_srs EPSG:900913 raster.tiff raster_merc.tiff
raster2mb -h for usage instructions.
This tool is compatible with MBTiles 1.1. It does not implement the optional
Because mbtiles is limited in the profiles it supports, it is only possible to use it to create tilesets from imagery that covers the entire world; imagery which is smaller will create a database successfully, but it will not be in the neccesary spherical mercator profile. If you wish to build a tileset, you must first make your image cover the entire world.