Bug report #22051
Build Virtual Raster is not considering Nodata = -9999
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | Alexander Bruy | ||
Category: | Processing/GDAL | ||
Affected QGIS version: | 3.4.7 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | invalid |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 29865 |
Description
The Build Virtual Raster tool - QGIS 3.4.7 (Resolution: average, Place alpha mask: off, Ressampling algorithm: nearest, Nodata value: -9999) seems not to be considering Nodata = -9999. Please see attached picture.
The four orthophotos were clipped using the GDAL Clip Raster by Mask Layer tool (Nodata value = -9999, Creat an output alpha band: off, Match the extent of the clipped raster to the extent of the mask layer: on, Keep resolution of output raster: off, Profile: Default, Output data type: Float64).
Note that the Merge tool - QGIS 3.4.7 (Output data type = Float64; Input pixel value to treat Nodata = -9999; Assign specified Nodata value to output = - 9999) works fine and creates the output file correctly
History
#1 Updated by Giovanni Manghi over 5 years ago
- Category changed from Processing/Core to Processing/GDAL
#2 Updated by Alexander Bruy over 5 years ago
- Operating System deleted (
Windows 10) - Assignee set to Alexander Bruy
- Status changed from Open to Feedback
Actually this is not bug. "Build virtual raster" algorithm allows to specify nodata value(s) for input bands while you are looking for a VRT nodata value. Please check GDAL documentation about difference between them https://www.gdal.org/gdalbuildvrt.html
#3 Updated by Sergio Antonio over 5 years ago
Alexander Bruy wrote:
Actually this is not bug. "Build virtual raster" algorithm allows to specify nodata value(s) for input bands while you are looking for a VRT nodata value. Please check GDAL documentation about difference between them https://www.gdal.org/gdalbuildvrt.html
Thank you. I understood and I agree that this is not a bug of the virtual raster build tool. However the white pixels of the attached result show the perimeters of the original images (before being cut using the Match the extent of the clipped raster to the extent of the mask layer option: on). I tried several configurations of the GDAL Clip Raster by Mask Layer and Build Virtual Raster tools. Excuse me, would you have any recommendations before closing this matter?
#4 Updated by Giovanni Manghi over 5 years ago
- Status changed from Feedback to Closed
- Resolution set to invalid
you probably need to add the alpha band when you clip.