Skip to content

Latest commit

 

History

History
42 lines (25 loc) · 1.77 KB

README.md

File metadata and controls

42 lines (25 loc) · 1.77 KB

gdal2mb logo

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

Installation

Clone the repository

git clone git://github.com/mapbox/raster2mb.git

Add raster2mb to your PATH and make it executable.

Usage

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.

Description

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.

MBTiles

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

Restrictions

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.