LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

gdal2tiles.py

generates web map tiles from rasters

TLDR

Generate tiles from image
$ gdal2tiles.py [input.tif] [output_dir]
copy
Specify zoom levels
$ gdal2tiles.py -z [5-18] [input.tif] [output_dir]
copy
Generate for Leaflet
$ gdal2tiles.py -w leaflet [input.tif] [output_dir]
copy
Use multiple processes
$ gdal2tiles.py --processes=[4] [input.tif] [output_dir]
copy
Specify tile format
$ gdal2tiles.py --tileformat=[png] [input.tif] [output_dir]
copy

SYNOPSIS

gdal2tiles.py [options] input outputdirectory_

DESCRIPTION

gdal2tiles.py generates map tiles from georeferenced raster images. It creates tile pyramids compatible with web mapping libraries like Leaflet and OpenLayers.The tool produces XYZ or TMS tile structures with optional HTML viewer pages. It handles large images by generating multiple zoom levels with appropriate resampling.gdal2tiles.py enables serving large geospatial imagery as web map tiles.

PARAMETERS

INPUT

Input raster file (GeoTIFF, etc.).
OUTPUTDIRECTORY_
Directory for output tiles.
-z LEVELS
Zoom levels (e.g., 5-18).
-w WEBVIEWER
Web viewer: leaflet, openlayers, none.
--processes N
Parallel processing.
--tileformat FORMAT
Tile format: png, jpeg, webp.
--help
Display help information.

INSTALL

sudo apt install gdal-bin
copy
sudo apk add gdal-tools
copy

CAVEATS

Large images need significant disk space. Processing time scales with zoom levels. Source must be georeferenced.

HISTORY

gdal2tiles.py is part of GDAL (Geospatial Data Abstraction Library), providing tile generation for web mapping from geospatial raster data.

SEE ALSO

RESOURCES

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid