Bug report #12795
Georeferencer generates incorrect GDAL script when input file is JPG
|Affected QGIS version:||2.8.5||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:||end of life|
|Crashes QGIS or corrupts data:||No||Copied to github as #:||20891|
When georeferencing a JPEG image QGIS return telling the transformation could not be made.
According to the GDAL script QGIS can generate, the process is split into two steps:
gdal_translate -of GTiff -gcp ... -gcp ... "original.jpg" "temp.jpg" gdalwarp -r near -tps -co COMPRESS=LZW -dstalpha "temp.jpg" "result.tif"
The input and output argument provided to
gdal_translate is both with JPG extension, while the
-of argument is
gdalwarp cannot handle a GeoTIFF image with JPG extension.
So either should the first process set the
-of argument to JPEG (in this instance) or change the output extension to TIF.
#2 Updated by Casper Børgesen over 5 years ago
Nyall Dawson wrote:
I can't reproduce - is this only when using the generated GDAL scripts? Does the georeferencing work OK from within QGIS itself?
I reported this problem because my users couldn't use QGIS directly and I had to create a batch script to solve the problem. Thats why I discovered the JPEG/TIFF problem.
I have a rather large (30MB) JPEG image and when I use QGIS to georeference it, I get the error "Failed to compute GCP transform. Transform is not solvable.". When I correct the JPEG/TIFF problem in the correspondig GDAL script generated by QGIS, the same transform succeeds. Thats why I thought the problem indeed was the extension.
I have just tried though with a small JPEG image and QGIS was able to transform it. I have tried both in QGIS f4c3f3d (latest weekly for windows).
Could this be image size related somehow?
#7 Updated by Giovanni Manghi over 1 year ago
- Resolution set to end of life
- Status changed from Open to Closed
End of life notice: QGIS 2.18 LTR