Skip to content
multiprocess combination of gdal2tiles.py and mbutil.py in order to write tiles directly into Mbtiles dbase
Python
Branch: master
Clone or download
Latest commit d85154d Feb 27, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gui pre-Alpha of Pre-Alpha raw GUI Feb 22, 2017
README.md Create Readme.md Feb 27, 2017
gdal2mbtiles.py pre-Alpha of Pre-Alpha raw GUI Feb 22, 2017
requirements.txt create requirements.txt Feb 27, 2017

README.md

gdal2mbtiles: Python-based tools for creating OGC MBTiles.

MBTiles Specification [RU], [EN]

Introduction

  • Combination of multiprocess gdal2tiles and mbutil in order to write tiles directly into Mbtiles database.
  • Writing tiles without transitional (temporary) storage on disk
  • Works in both ways: as CLI script and from interface. Just launch window.py from gui

Requirements

Basic Usage

python gdal2mbtiles.py input_file [options] -z min_zoom - maxzoom output.mbtiles

gdal2mbtiles --help to see list of available options:

--version (Doesn't work) show program's version number and exit

-h, --help show this help message and exit

-p PROFILE, --profile=PROFILE Tile cutting profile (mercator,geodetic,raster) - default 'mercator' (Google Maps compatible)

-r RESAMPLING, --resampling=RESAMPLING Resampling method (average,near,bilinear,cubic,cubicsp line,lanczos,antialias) - default 'average'

-s SRS, --s_srs=SRS The spatial reference system used for the source input data

-z ZOOM, --zoom=ZOOM Zoom levels to render (format:'2-5' or '10').

-e, --resume Resume mode. Generate only missing files.

-a NODATA, --srcnodata=NODATA NODATA transparency value to assign to the input data --processes=PROCESSES Number of concurrent processes (defaults to the number of cores in the system)

-v, --verbose Print status messages to stdout

Web viewer options:

Options for generated HTML viewers a la Google Maps

`-w WEBVIEWER, --webviewer=WEBVIEWER`
                    Web viewer to generate
                    (all,google,openlayers,leaflet,index,metadata,none) -
                    default 'all'
`-t TITLE, --title=TITLE`
                    Title of the map
`-c COPYRIGHT, --copyright=COPYRIGHT`
                    Copyright for the map
`-g GOOGLEKEY, --googlekey=GOOGLEKEY`
                    Google Maps API key from
                    http://code.google.com/apis/maps/signup.html
`-y YAHOOKEY, --yahookey=YAHOOKEY`
                    Yahoo Application ID from
                    http://developer.yahoo.com/wsregapp/

Config options:

Options for config parameters

`-x, --auxfiles`      Generate aux.xml files.

`-f OUTPUT_FORMAT, --format=OUTPUT_FORMAT`
                    Image format for output tiles. Just PNG and JPEG
                    allowed. PNG is selected by default
                    
`-o OUTPUT_CACHE, --output=OUTPUT_CACHE`
                    Format for output cache. Values allowed are tms and
                    xyz, being xyz the default value                       

Example

gdal2mbtiles.py input.tif -z 12-14 -a 0 output.mbtiles

You can’t perform that action at this time.