I want to substract two covering raster sets in the Raster Calculator in QGIS to get a difference map. The raster sets have different extents and raster size.
How does the algorithm of Raster Calculator exactly interpolates the difference raster?
1 Answer
I am not sure what do you mean by raster size whether it is a synonym of raster extent or not, or you mean a raster resolution. Anyway let me explain how raster calculator works when you two raster data of different extents.
When you have a situation that you need to do a calculation involving two raster data of different extents as in the following example, you need to choose the output extent by selecting one of the input raster data (Raster bands) as you can see below:
- Select a an input under
Raster bands
- Click on
Current layer extent
- The X min, Y min, X max, and Y max will be updated based on the extent of the selected input raster. In the above image
DEM_Sub@1
was selected
If I select the second image: DEM_Full@1
and click on Current layer extent
, the extent will be updated:
-
Thank you for your answer. Now, one point of my question is explained. With raster size i mean raster resolution ;-). The second part of my question is: Which interpolation method it uses (e.g. Nearest Neighbour, IDW, ...) for the cells of the new difference raster?– VaiaroCommented Nov 12, 2017 at 12:05
-
@CanisLupus the resolution of output image depends on the resolution of the selected output extent, and generally if you have two different images with different extents (one smaller and one bigger), it is better to choose the output extent of the smaller image because this is the overlap between the two images. For the interpolation method there is no relation between the output result and interpolation because you are not interpolating point data to create a raster, it is already a raster data. But if the raster was created from points data, the output result will depend on the input data. Commented Nov 13, 2017 at 3:34