[GIS] gdal_translate or gdalwarp to define projection

coordinate systemgdal-translategdalwarp

Which of these is the best approach to define (AKA. set) a projection for a tiff?

1) gdal_translate -a_srs EPSG:32182 in.tif out.tif

2) gdalwarp -s_srs EPSG:32182 -t_srs EPSG:32182 in.tif out.tif

Best Answer

if you want to set the projection of a file with gdal tools, you should use gdal_edit.py -a_srs

Both gdalwarp and gdal_translate will create a new file.

Related Question