Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 902 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 902 Bytes

GIS-gdal-ogr-cdo-ncl

Cheat sheet for GDAL/OGR command-line tools

Extends cheat sheet gdal-cheat-sheet.md from https://github.com/dwtkns/gdal-cheat-sheet

netCDf:

nc to tiff gdal_translate -of GTiff -b 1 NETCDF:$file:$var foo.tif

calc: gdal_calc.py --calc="A+B" -A "africa.tif" -B "africa.nodata.tif" --outfile="africa.2nc.tif"

nodata: gdal_translate -a_nodata -999 -ot Int16 -of NetCDF africa.2nc.tif africa.nc

coordinates: gdalwarp -s_srs EPSG:4326 -t_srs EPSG:3067 $infile $outfile

remove metadata ncatted -h -a history,global,d,, $file

vector: raster polygonize gdal_polygonize.py -b 1 tifx100/$i -f "ESRI Shapefile" shp/$outfilename.shp

tiff to kml neeeds colored rasters

gdaldem color-relief -alpha -of vrt kk/withlatlon.vrt $var.colors.txt kk/${tag}.vrt /usr/bin/gdal2tiles.py -z 6-12 -p geodetic -k kk/${tag}.vrt kk/