2

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 haven't found ANY documentation on how to properly CREATE a GeoTIFF from an image and a world file (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 command line 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 unreadable.

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

This also lead to an unreadable file.

gdal_translate -of GTiff -co COMPRESS=JPEG -co tfw=yes -a_srs EPSG:3857 geotiff.tif baseline.tif
nmtoken
  • 13,355
  • 5
  • 38
  • 87
Andreas
  • 51
  • 3
  • 3
    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 09:37
  • Setting -a_srs was what did the trick for me. With this my GeoTIFF was useable for further processing. – z80crew Mar 23 '20 at 10:37

0 Answers0