qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.61k stars 3.01k forks source link

Processing: gdal merge converts no data in 0 #23671

Closed qgib closed 6 years ago

qgib commented 8 years ago

Author Name: Paolo Cavallini (@pcav) Original Redmine Issue: 15749 Affected QGIS version: 2.18.0 Redmine category:processing/gdal Assignee: Giovanni Manghi


gdal merge, as it is used in Processing, converts no data in 0

gdal_merge.py -ot Float32 -o  -of GTiff OUTPUT1.tif OUTPUT2.tif

See sample input and output files: http://www.faunalia.eu/~paolo/merge_null.zip

Previously this did not happen, on the same files.


Related issue(s): #25196 (relates) Redmine related issue(s): 17298


qgib commented 8 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 8 years ago

Author Name: Alexander Bruy (@alexbruy)


Looks like there are changes in gdal_merge behaviour. Works fine with GDAL 1.10.1

qgib commented 8 years ago

Author Name: Paolo Cavallini (@pcav)


I had a look to GDAL manpage, and could not spot the change. GDAL 2.1.1+dfsg-5 here.

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


gdalwarp manual states "The gdalwarp utility is an image mosaicing, reprojection and warping utility", and in fact it works (to create mosaics) and is much more efficient than gdal_merge.py, not to speak richer of options, one of them the one to pick the nodata from inputs.

We will replace the gdal raster merging tool with gdalwarp then.


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


2.18 fixed here

https://github.com/qgis/QGIS/pull/4918

needs forwardport to master, will do when GDAL is restored in master so I will be able to test.


gdal_merge.py -ot Float32 -o  -of GTiff OUTPUT1.tif OUTPUT2.tif

See sample input and output files: http://www.faunalia.eu/~paolo/merge_null.zip

Previously this did not happen, on the same files. to gdal merge, as it is used in Processing, converts no data in 0

gdal_merge.py -ot Float32 -o  -of GTiff OUTPUT1.tif OUTPUT2.tif

See sample input and output files: http://www.faunalia.eu/~paolo/merge_null.zip

Previously this did not happen, on the same files.

qgib commented 7 years ago

Author Name: Giovanni Manghi (@gioman)


Giovanni Manghi wrote:

2.18 fixed here

https://github.com/qgis/QGIS/pull/4918

needs forwardport to master, will do when GDAL is restored in master so I will be able to test.

now blocked by #25196

qgib commented 7 years ago

Author Name: Jürgen Fischer (@jef-n)


qgib commented 6 years ago

Author Name: Paolo Cavallini (@pcav)


Should be done now.