18

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.

2 Answers 2

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.

3
  • 5
    You also need to ensure that a coordinate system is set with -a_srs otherwise it is kind of a malformed GeoTIFF.
    – mdsumner
    Feb 25, 2014 at 20:29
  • i don't understand, where in your command do you input the .tfw file? Mar 20, 2023 at 14:51
  • GDAL will automatically use a .tfw file. So it is in the same folder as input.tif and called input.tfw. Mar 20, 2023 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).

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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