6

I have no much experience in raster data in QGIS. I have an ungeoreferenced TIFF file with the related TFW file as below.

0.1
0
0
-0.1
406443.06
4545334.18

When I add the TIFF file to QGIS, the raster is placed in the wrong location as in the image (small dot is the raster). I didn't expect that.

enter image description here

Is the TFW file not enough to place a .tif data in the correct location? What should I do?

PS: If I export the map canvas as JPG (generates a JGW(world) file automatically) and add it to QGIS, it is placed correctly. QGIS exports also the JPG file as ungeoreferenced.

11
  • 2
    I would say that what you have is a partly georeferenced file but you can't find the coordinate system from TFW. You must know the CRS from some other source or guess it right. The ESRI way to tell the CRS information is to write it into another sidecar file, .prj. Alternative system that ESRI and GDAL are using is to write a .aux.xml file.
    – user30184
    Dec 19, 2021 at 19:22
  • @user30184 you can't find the coordinate system from TFW: I am aware of that. But when I export the actual map canvas as JPG and add it to QGIS, no problem for the JPG. Dec 19, 2021 at 19:26
  • Because you export the JPG in the same CRS that you have when you read it back. Or maybe QGIS exports also the .aux.xml file, have your checked the output directory? In that case the image would open in the right place even if you change the CRS of your QGIS project.
    – user30184
    Dec 19, 2021 at 19:28
  • 1
    Ok, make a test and change the CRS of QGIS project. Add jpg+jgw and image should appear into wrong place. But because you know the real CRS you can use the menu from the mouse right click and specify the CRS of the image layer and it will be in the right place again.
    – user30184
    Dec 19, 2021 at 19:32
  • 1
    Looks like your UTM coordinates of the TFW is interpreted as Equatorial mercator: check that the tif layer coordinate system is UTM
    – Hans Erren
    Dec 19, 2021 at 21:07

1 Answer 1

5

No. It isn't. You need to know crs of the data. Considering that you are working on Istanbul and that Easting and Northing of the upper values are 406443.06 and 4545334.18, the crs of the raster must be UTM (6°, EPSG:32635) or Gauss Krüger (3°, EPSG:5254).

If you set the right crs for the layer, it is placed into the right location. Try right-click - Layer CRS - SetLayer CRS...

1
  • 1
    Layer CRS - SetLayer CRS... worked. I just needed to export as a new tiff file because it didn't change the source file's crs. Thank you. Dec 21, 2021 at 18:44

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.