Public Lab Wiki documentation



GDAL Commands

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

GDAL commands used for our public map archive

Lists information about a raster dataset

gdalinfo -stats input.tif

Prepare image fro new map coordinate system with GCPs

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

Warp an image into a new coordinate system

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

Publish image map for tiled viewer. 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_dir

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

convert 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

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