I have an georeferenced JPG file and a JGW file containing the coordinates. How can I transform it to a georeferenced TIF file and a TFW file?

I have tried to save the JPG file as an TIF file in Paint and save the JGW file to an TFW file with Notepad, but it doesn't work in my cartography program (OCAD) when I want to import the files. So maybe I have to transform the files in a different way.

See also How can I open a georeferenced JPG file in OCAD?

  • DavidF, your answer was really helpful! I have two followup questions if you'd be willing to help. I used the exact commands you mentioned (gdal_translate -of GTiff myFile.jpg myFile.tif) to convert a georeferenced jpg to a geotiff, but the converted image is distorted such that it is no longer correctly georeferenced. Do you know how to fix this? (See image here dl.dropbox.com/u/17669584/gdal_translate%20error.JPG. Sorry, I don't have enough reputation points to post an image on stackexchange. The left image is the georeferenced jpg. The right image is the converted geotiff, and purple – Stavros Feb 20 '13 at 23:05

You could use gdaltranslate.

gdal_translate -of GTiff  myFile.jpg myFile.tif

This will actually give you a geoTiff, not a tiff with a world file.

You could also try renaming your 'TGW' file to a 'TFW'.

|improve this answer|||||
  • Ah, it was a .tfw file I meant, it was a typo by me. I have updated my question. – Jonas Sep 30 '10 at 13:49
  • Is gdaltranslate a unix software or so? Where can I get it and is it available for Windows? – Jonas Sep 30 '10 at 14:16
  • 1
    gdaltranslate is one of the commandline utilty tools that are part of gdal [gdal.org/]. gdal is used by both OpenSource and ESRI (raster only) tools to provide support for reading/writing raster and vector data. For windows, the easiest way to install it is to either use the OSGEO4W installer or the FWTools installer. The OpenSource Desktop GIS QGIS has a plugin called GDALTools which allows you to do this using a gui tool. – DavidF Sep 30 '10 at 16:46
  • 2
    gdal_translate allows you to create a basic, non-GeoTIFF tiff with worldfile by passing GeoTIFF creation options with the -co parameter. Something like gdal_translate -of GTiff -co "PROFILE=BASELINE" -co "TFW=YES" myFile.jpg myFile.tif – JasonBirch Oct 3 '10 at 23:10
  • good catch Jason! – DavidF Oct 4 '10 at 13:31

In Quantum GIS (QGIS) 1.8, you can do this very easily: just go to Raster -> Conversion -> Translate (Convert format). Then you can convert loaded layer in QGIS, single files or whole folder in batch mode. You may need to enable the GDALTools plugin first.

menu order

GDAL Translate GUI

|improve this answer|||||

You can create an ESRI TIFF World file from the command line using the utility listgeo, part of the GeoTiff library. Use the option "-tfw". See the usage:

Usage: listgeo [-d] [-tfw] [-proj4] [-no_norm] [-t tabledir] filename

-d: report lat/long corners in decimal degrees instead of DMS.
-tfw: Generate a .tfw (ESRI TIFF World) file for the target file.
-proj4: Report PROJ.4 equivelent projection definition.
-no_norm: Don't report 'normalized' parameter values.
filename: Name of the GeoTIFF file to report on.
|improve this answer|||||

I am trying to complete this image conversion process, mainly to adjust the CRS. However, all I get is a tiny sliver of the original image. Any thoughts?

Completed files here https://www.dropbox.com/sh/bxxmcvb2wrb9gl4/AACi6S6GKGPpcLUWT0o_-nKAa?dl=0 Screenshot of dialog https://www.dropbox.com/s/kpy1fkij0d8p1t0/Screenshot%202018-02-19%2019.48.33.png?dl=0

|improve this answer|||||
  • This isn't an answer to the question. You should start a new thread with your own question. – Dowlers Feb 19 '18 at 20:47

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.