Skip to main content

Converts a GDAL-readable dataset into an MBTiles file. This is used to generate web maps.

Project description

gdal2mbtiles helps you generate web mapping tiles that can be shown through a browser-based mapping library on your website.

GDAL-readable files are images that are georeference, that means that they are positioned and projected on to the world. In order to display a dynamic map on the web, you don’t want to serve the whole image at once, so it must be sliced into tiles that are hosted by a tile server.

The MBTiles file format was developed by MapBox to make tile storage easier. You can upload the final file to their service, or run your own tile server. MapBox provides one called TileStream.

Installation

You can get a copy of the source by using:

$ git clone https://github.com/ecometrica/gdal2mbtiles.git

Note that this program requires Python 2.7 or higher.

External Dependencies

We rely on GDAL to read georeferenced datasets. However, it is not available on PyPi.

Under Debian or Ubuntu, run the following to install it:

$ sudo apt-get install python-gdal

We also rely on VIPS to do fast image processing. It’s also not available on PyPi.

Under Debian or Ubuntu, run the following to install it:

$ sudo apt-get install python-vipscc

If you are using a virtualenv, you will need to symlink Python library in the right place. Under Debian or Ubuntu, assuming Python 2.7, run the following:

$ ln -s /usr/lib/python2.7/dist-packages/vipsCC $VIRTUAL_ENV/lib/python2.7/site-packages/

You’ll also need a few other libraries to deal with large TIFF files and to optimize the resulting PNG tiles.

Under Debian or Ubuntu, run the following to install them:

$ sudo apt-get install libtiff5 optipng pngquant

Reporting bugs and submitting patches

Please check our issue tracker for known bugs and feature requests.

We accept pull requests for fixes and new features.

Credits

Maxime Dupuis and Simon Law wrote this program, with the generous support of Ecometrica.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gdal2mbtiles-1.3.0.tar.gz (44.0 kB view details)

Uploaded Source

File details

Details for the file gdal2mbtiles-1.3.0.tar.gz.

File metadata

File hashes

Hashes for gdal2mbtiles-1.3.0.tar.gz
Algorithm Hash digest
SHA256 9409e7283ad3ef1cc6c6529761e41d2f7683e64be53d42b44d7c9fb3c28b5189
MD5 5889c9edb8d23cd089e1b812a40e3694
BLAKE2b-256 71941a0a66dc4fb393088eb2d86d239398eaf7f40eaba4ee0f6ed4e9f05d763b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page