2

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"

  • the transform is not solvable! - please add in a screen shot showing your map and the control points on the image and the map – Ian Turton May 18 '17 at 8:31
  • Something is wrong with the ground control points which you have introduced. You should see also the gdalwarp and gdal_translate commands which the tool is generating, copy-paste them into your question. – user30184 May 18 '17 at 8:37
  • Hi, thanks to both, I added the screenshot and the command – giulio May 18 '17 at 8:58
  • 2
    If you set CRS to EPSG:32632 you must give the coordinates of GCP's in the same system. You seem to have EPSG:4326 GCP's now. But you must have also something else wrong. I must be thinking a little bit. – user30184 May 18 '17 at 9:00
  • possibly related to this issue? (it mentions jpg, but may be the same thing - saving your TIFF with a PNG extentsion causing gdalwarp to fail in the second step) – Steven Kay May 18 '17 at 9:59
3

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.

1

I think it may be a problem with out output destination C:/Giulio_files/Documenti/University/PhD/PhD Thesis/Data/02_Aerial photos

try changing PhD Thesis to PhD_Thesis - I've had problems with spaces in destination folder paths in the past

  • Done, but it didin't solve – giulio May 18 '17 at 13:00

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.