0

I have a geotiff file in UTM and units in meters. I used gdal_translate with this command :

gdal_translate -of GTiff -a_nodata 0 -a_srs EPSG:4326 old.tif new.tif

gdalinfo on new.tif shows that the file units are in degrees while the data (corners,origin ...etc) are given in meters which is wrong. Is it possible to reverse/correct this action (on the new file) so I can get the file with either UTM in meters or go on and make the file in "real" degrees because I deleted the original file?

Thanks.

5

You seem to be getting confused between a geographic coordinate system, which is what EPSG:4326 represents, and a projected coordinate system. Looking at this answer might help.

To recover the right projection parameters in this case, you need to know which zone your data is in, then use the -a_srs parameter with either EPSG:327xx for the southern hemisphere or EPSG:326xx for the northern hemisphere, where xx is the UTM zone.

1

Praobably what you want is gdalwarp. It is the right tool to make projection transforms, indicating the source (s_srs) and the target (t_srs) CRS. The a_srs option in gdal_translate overrides the Geotiff projection, it doesn't transform it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.