1GDAL2TILES(1)                        GDAL                        GDAL2TILES(1)
2
3
4

NAME

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

SYNOPSIS

10          gdal2tiles.py [-p profile] [-r resampling] [-s srs] [-z zoom]
11                        [-e] [-a nodata] [-v] [-q] [-h] [-k] [-n] [-u url]
12                        [-w webviewer] [-t title] [-c copyright]
13                        [--processes=NB_PROCESSES] [--xyz]
14                        --tilesize=PIXELS
15                        [-g googlekey] [-b bingkey] input_file [output_dir]
16

DESCRIPTION

18       This utility generates a directory with small tiles and metadata,  fol‐
19       lowing  the OSGeo Tile Map Service Specification. Simple web pages with
20       viewers based on Google Maps, OpenLayers and Leaflet are  generated  as
21       well  - so anybody can comfortably explore your maps on-line and you do
22       not need to install or configure any special software (like  MapServer)
23       and the map displays very fast in the web browser. You only need to up‐
24       load the generated directory onto a web server.
25
26       GDAL2Tiles also creates the necessary metadata for  Google  Earth  (KML
27       SuperOverlay), in case the supplied map uses EPSG:4326 projection.
28
29       World files and embedded georeferencing is used during tile generation,
30       but you can publish a picture without proper georeferencing too.
31
32       NOTE:
33          Inputs with non-Byte data type  (i.e.  Int16,  UInt16,...)  will  be
34          clamped  to the Byte data type, causing wrong results. To awoid this
35          it is necessary to  rescale  input  to  the  Byte  data  type  using
36          gdal_translate utility.
37
38       -p <PROFILE>, --profile=<PROFILE>
39              Tile  cutting  profile  (mercator,  geodetic,  raster) - default
40              'mercator' (Google Maps compatible).
41
42              Starting with GDAL 3.2, additional profiles are  available  from
43              tms_XXXX.json  files placed in GDAL data directory (provided all
44              zoom levels use same origin, tile dimensions, and resolution be‐
45              tween consecutive zoom levels vary by a factor of two).
46
47       -r <RESAMPLING>, --resampling=<RESAMPLING>
48              Resampling  method (average, near, bilinear, cubic, cubicspline,
49              lanczos, antialias, mode, max, min, med, q1, q3) - default  'av‐
50              erage'.
51
52       -s <SRS>, --s_srs=<SRS>
53              The spatial reference system used for the source input data.
54
55       --xyz  Generate XYZ tiles (OSM Slippy Map standard) instead of TMS.  In
56              the default mode (TMS),  tiles  at  y=0  are  the  southern-most
57              tiles,  whereas in XYZ mode (used by OGC WMTS too), tiles at y=0
58              are the northern-most tiles.
59
60              New in version 3.1.
61
62
63       -z <ZOOM>, --zoom=<ZOOM>
64              Zoom levels to render (format:'2-5' or '10').
65
66       -e, --resume
67              Resume mode. Generate only missing files.
68
69       -a <NODATA>, --srcnodata=<NODATA>
70              Value in the input dataset considered as transparent. If the in‐
71              put  dataset  had already an associate nodata value, it is over‐
72              ridden by the specified value.
73
74       -v, --verbose
75              Generate verbose output of tile generation.
76
77       -q, --quiet
78              Disable messages and status to stdout
79
80              New in version 2.1.
81
82
83       --processes=<NB_PROCESSES>
84              Number of parallel processes to use for tiling, to speed-up  the
85              computation.
86
87              New in version 2.3.
88
89
90       --tilesize=<PIXELS>
91              Width and height in pixel of a tile. Default is 256.
92
93              New in version 3.1.
94
95
96       -h, --help
97              Show help message and exit.
98
99       --version
100              Show program's version number and exit.
101
102   KML (Google Earth) options
103       Options for generated Google Earth SuperOverlay metadata
104
105       -k, --force-kml
106              Generate  KML  for Google Earth - default for 'geodetic' profile
107              and 'raster' in EPSG:4326. For a dataset with different  projec‐
108              tion use with caution!
109
110       -n, --no-kml
111              Avoid automatic generation of KML files for EPSG:4326.
112
113       -u <URL>, --url=<URL>
114              URL address where the generated tiles are going to be published.
115
116   Web viewer options
117       Options for generated HTML viewers a la Google Maps
118
119       -w <WEBVIEWER>, --webviewer=<WEBVIEWER>
120              Web viewer to generate (all, google, openlayers, leaflet, mapml,
121              none) - default 'all'.
122
123       -t <TITLE>, --title=<TITLE>
124              Title of the map.
125
126       -c <COPYRIGHT>, --copyright=<COPYRIGHT>
127              Copyright for the map.
128
129       -g <GOOGLEKEY>, --googlekey=<GOOGLEKEY>
130              Google           Maps           API           key           from
131              http://code.google.com/apis/maps/signup.html.
132
133       -b <BINGKEY>, --bingkey=<BINGKEY>
134              Bing Maps API key from https://www.bingmapsportal.com/
135
136       NOTE:
137          gdal2tiles.py is a Python script that needs to be run against Python
138          GDAL binding.
139
140   MapML options
141       MapML support is new to GDAL 3.2. When --webviewer=mapml is  specified,
142       --xyz is implied, as well as --tmscompatible if --profile=geodetic.
143
144       The following profiles are supported:
145
146       • mercator: mapped to OSMTILE MapML tiling scheme
147
148       • geodetic: mapped to WGS84 MapML tiling scheme
149
150       • APSTILE: from the tms_MapML_APSTILE.json data file
151
152       The generated MapML file in the output directory is mapml.mapl
153
154       Available options are:
155
156       --mapml-template=<filename>
157              Filename  of  a template mapml file where variables will be sub‐
158              stituted. If not  specified,  the  generic  template_tiles.mapml
159              file from GDAL data resources will be used
160
161       The --url option is also used to substitue ${URL} in the template MapML
162       file.
163

EXAMPLES

165       Basic example:
166
167          gdal2tiles.py --zoom=2-5 input.tif output_folder
168
169       MapML generation:
170
171          gdal2tiles.py --zoom=16-18 -w mapml -p APSTILE --url "https://example.com" input.tif output_folder
172

AUTHOR

174       Klokan Petr Pridal <klokan@klokan.cz>
175
177       1998-2021
178
179
180
181
182                                 Mar 24, 2021                    GDAL2TILES(1)
Impressum