a version of gdal2tiles with MBTiles support
Pull request Compare This branch is 7 commits ahead of developmentseed:master.
Latest commit a364c2e Jun 13, 2011 @crschmidt Update readme to include mention of restriction and removed incomplete
line as well as pointer to mapsonastick.


gdal2mb logo

An importer for MBTiles that processes GeoTIFF and other GDAL-compatible raster formats into tilesets.


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

Run raster2mb -h for usage instructions.


This is a variation of the gdal2tiles script that supports MapBox mbtiles SQLite tilesets as an output option. It has the same requirements as the original script - notably an installation of GDAL.


This tool is compatible with MBTiles 1.1. It does not implement the optional bounds entry.


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.