Public Lab Wiki documentation



GDAL Commands

This is a revision from February 17, 2012 04:14. View all revisions
3 | 15 | | #228

GDAL commands used for our public map archive

Lists information about a raster dataset

gdalinfo -stats input.tif

generate MBTiles from GeoTiff

raster2mb input.tif output.mbtiles

generate JPG from GeoTiff

gdal_translate -of JPEG -b 1 -b 2 -b 3 input.tif output.jpg

converts raster data between different formats - With a_ullr

gdal_translate -of GTiff -a_srs EPSG:4326 -a_ullr ulx uly lrx lry input.tif output.tif

converts raster data between different formats - With GCPs

gdal_translate -of GTiff -a_srs EPSG:4326 -gcp x(longitude "pixel") y(latitude "line") easting northing input.tif output.tif

image reprojection and warping utility

gdalwarp -of GTiff -t_srs EPSG:4326 input.tif output.tif

generating TMS tiles, KMLs and web viewers

gdal2tiles.py --title="Map Title" --tile-format="jpeg" --zoom=12-23 --copyright=COPYRIGHT --googlekey=KEYCODE input.tif output.tif

all gdal utility programs http://gdal.org/gdal_utilities.html