I've used GDAL tools for several other operations on GeoTIFFs.

There is lots of information on how to splice geotiffs into pgw world files and images, but I havent found ANY documentation on how to properly CREATE a geotif from an image and and a worldfile (plus CRS format info).

This can be done by loading a layer in QGIS and exporting it as GeoTIFF, but need to use the GDAL commandline directly for batch conversions.

I've found one somewhat related question, which use world files as input. GDAL rotate DEM But despite GDAL created the file without showing errors, the file was unreadeable.

gdal_translate -of GTiff -co profile=baseline -co tfw=yes geotiff.tif baseline.tif

This also lead to an unreadeable file.

gdal_translate -of GTiff -co COMPRESS=JPEG -co tfw=yes -a_srs EPSG:3857 geotiff.tif baseline.tif
  • 2
    Not sure I understand correctly. If I create a input.png and associated input.pgw, then gdal_translate -of Gtiff input.png output.tif generates a readable geotiff for me. I also tried taking a nongeotiff tiff, but where I had an associated pgw file, and I converted by gdal_translate to png (so it would pick up the orphan pgw) and then translate back to tiff, which was a geotiff based on the pgw file. Can you tell us more explicitly what format the input image and input worldfile are in? – Houska May 10 '19 at 18:16
  • Profile=baseline especially does not create GeoTIFF but a plain tif without internally stored georeferencing info. Take it off as well as the then unnecessary -co tfw=yes and your latter command should be OK. – user30184 May 10 '19 at 20:34
  • Even without "profile=baseline", the file which was created, is not useable as a geotiff – Andreas May 16 '19 at 9:37

Your Answer

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

Browse other questions tagged or ask your own question.