DOKK / manpages / debian 10 / python-gdal / gdal2tiles.1.en
gdal2tiles(1) General Commands Manual gdal2tiles(1)

gdal2tiles - Generates directory with TMS tiles, KMLs and simple web viewers.

gdal2tiles.py [-p profile] [-r resampling] [-s srs] [-z zoom]

[-e] [-a nodata] [-v] [-q] [-h] [-k] [-n] [-u url]
[-w webviewer] [-t title] [-c copyright]
[--processes=NB_PROCESSES]
[-g googlekey] [-b bingkey] input_file [output_dir]

This utility generates a directory with small tiles and metadata, following the OSGeo Tile Map Service Specification. Simple web pages with viewers based on Google Maps, OpenLayers and Leaflet are generated as well - so anybody can comfortably explore your maps on-line and you do not need to install or configure any special software (like MapServer) and the map displays very fast in the web browser. You only need to upload the generated directory onto a web server.

GDAL2Tiles also creates the necessary metadata for Google Earth (KML SuperOverlay), in case the supplied map uses EPSG:4326 projection.

World files and embedded georeferencing is used during tile generation, but you can publish a picture without proper georeferencing too.

Tile cutting profile (mercator,geodetic,raster) - default 'mercator' (Google Maps compatible).
Resampling method (average,near,bilinear,cubic,cubicspline,lanczos,antialias) - default 'average'.
The spatial reference system used for the source input data.
Zoom levels to render (format:'2-5' or '10').
Resume mode. Generate only missing files.
NODATA transparency value to assign to the input data.
Generate verbose output of tile generation.
Disable messages and status to stdout (GDAL >= 2.1).
Number of processes to use for tiling (GDAL >= 2.3).
Show help message and exit.
Show program's version number and exit.

KML (Google Earth) options:

Options for generated Google Earth SuperOverlay metadata

Generate KML for Google Earth - default for 'geodetic' profile and 'raster' in EPSG:4326. For a dataset with different projection use with caution!
Avoid automatic generation of KML files for EPSG:4326.
URL address where the generated tiles are going to be published.

Web viewer options:

Options for generated HTML viewers a la Google Maps

Web viewer to generate (all,google,openlayers,leaflet,none) - default 'all'.
Title of the map.
Copyright for the map.
Google Maps API key from http://code.google.com/apis/maps/signup.html.
Bing Maps API key from https://www.bingmapsportal.com/

NOTE: gdal2tiles.py is a Python script that needs to be run against 'new generation' Python GDAL binding.

Klokan Petr Pridal klokan@klokan.cz as a Google SoC 2007 Project.

Sun Jan 13 2019 GDAL