GDAL2TILES(1) | GDAL | 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] [--mpi] [--xyz]
[--tilesize=PIXELS] [--tmscompatible]
[-g googlekey] [-b bingkey] input_file [output_dir] [COMMON_OPTIONS]
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.
NOTE:
NOTE:
Starting with GDAL 3.2, additional profiles are available from tms_XXXX.json files placed in GDAL data directory (provided all zoom levels use same origin, tile dimensions, and resolution between consecutive zoom levels vary by a factor of two).
New in version 3.1.
New in version 2.1.
New in version 2.3.
New in version 3.5.
New in version 3.1.
New in version 3.6.
Options for generated Google Earth SuperOverlay metadata
Options for generated HTML viewers a la Google Maps
NOTE:
MapML support is new to GDAL 3.2. When --webviewer=mapml is specified, --xyz is implied, as well as --tmscompatible if --profile=geodetic.
The following profiles are supported:
The generated MapML file in the output directory is mapml.mapl
Available options are:
The --url option is also used to substitute ${URL} in the template MapML file.
WEBP tiledriver support is new to GDAL 3.6. It is enabled by using --tiledriver=WEBP.
The following configuration options are available to further customize the webp output:
NOTE:
Basic example:
gdal2tiles.py --zoom=2-5 input.tif output_folder
MapML generation:
gdal2tiles.py --zoom=16-18 -w mapml -p APSTILE --url "https://example.com" input.tif output_folder
MPI example:
mpiexec -n $NB_PROCESSES gdal2tiles.py --mpi --config GDAL_CACHEMAX 500 --zoom=2-5 input.tif output_folder
Klokan Petr Pridal <klokan@klokan.cz>
1998-2023
January 2, 2023 |