I have a tif image file, and a .tfw world file (created from OSM data with Mapertive). How can I (using linux command line) convert that to a GeoTIFF file? (i.e. I want to have one file, not 2). I'm sure it's possible with gdal or something.
Asked
Active
Viewed 2.8k times
2 Answers
22
So you want a geotiff instead of a tiff with a world file (.tfw). This should be the default in GDAL (http://www.gdal.org/frmt_gtiff.html) so:
gdal_translate -of GTiff input.tif ouput.tif
It will default to geotiff.
raaj
- 285
- 1
- 10
HeikkiVesanto
- 16,433
- 2
- 46
- 68
-
5You also need to ensure that a coordinate system is set with -a_srs otherwise it is kind of a malformed GeoTIFF. – mdsumner Feb 25 '14 at 20:29
-
i don't understand, where in your command do you input the .tfw file? – João Pimentel Ferreira Mar 20 '23 at 14:51
-
GDAL will automatically use a .tfw file. So it is in the same folder as input.tif and called input.tfw. – HeikkiVesanto Mar 20 '23 at 17:15
10
Or you can use geotifcp (http://geotiff.maptools.org/geotifcp.html).
To dump the data from a GeoTiff to a world file try listgeo (http://geotiff.maptools.org/listgeo.html).