[GIS] Georeferencer QGIS not working

georeferencingpngqgiswgs84

I am trying to georeference a .png file. After inserting all the data I get the following error

"Transform Failed: Failed to compute GCP transform: Transform is not solvable."

What can be the problem?

enter image description here

enter image description here

gdal_translate -of GTiff -gcp 324.814 728.712 11.3582 43.5428 -gcp
354.101 637.672 11.3582 45.5428 -gcp 476.351 216.605 11.3586 43.5427 -gcp 518.207 168.548 11.3585 43.5426 -gcp 342.315 362.074 11.3585 43.5428 "C:/Giulio_files/Documenti/University/PhD/PhD Thesis/Data/02_Aerial photos/frattaglie.png"
"C:/Users/Giulio/AppData/Local/Temp/frattaglie.png"

gdalwarp -r near
-tps -co COMPRESS=NONE "C:/Users/Giulio/AppData/Local/Temp/frattaglie.png"
"C:/Giulio_files/Documenti/University/PhD/PhD Thesis/Data/02_Aerial
photos/frattaglie_modified.tif"

Best Answer

If you look at the ground control points in the generated gdalwarp command you should see that they do not make sense.

     pixel   row     x        y 
-gcp 324.814 728.712 11.3582 43.5428 
-gcp 354.101 637.672 11.3582 45.5428 
-gcp 476.351 216.605 11.3586 43.5427 
-gcp 518.207 168.548 11.3585 43.5426 
-gcp 342.315 362.074 11.3585 43.5428

Two of the points have exactly same coordinates but still different pixel/row. Three other points have almost identical coordinates.

The reason may be that QGIS is automatically truncating coordinates at fourth place which is too coarse for you. As a workaround measure your Ground Control points in EPSG:32632 units or measure as EPSG:4326 but convert to EPSG:32632 for QGIS. You can do that with gdaltransform http://www.gdal.org/gdaltransform.html.

gdaltransform -s_srs epsg:4326 -t_srs epsg:32632
11.3582 43.5428
690515.193804498 4823796.38860415 0

Alternatively, if you have accurate EPSG:4326 coordinates you can edit the gdal_translate command by hand and run gdal_translate directly from the command shell.

Related Question