Tuesday 21 August 2018

arcgis desktop - What will happen if we subtract two raster with different cell size using Raster Calculator?


I want to subtract a topography raster with a depth raster. The problem is the two rasters have different cell size. The topography raster have a square cell size of 5, 5 while the depth raster have a rectangular cell size of 10, 3.


How the Raster Calculator work with that way? Does it give accurate result?



Answer



when to rasters have different cell sizes, the raster calculator will internally resample the rasters in order to have pixels of the same size. You can select the type of resampling in the environment settings of your geoprocessing tool, using:





  • minimum




  • maximum




  • same as one layer




  • custom size





In your case, you don't have a pixel size that is a multiple of the other cell size. Therefore the resampling will be lossy if you use a pixel size from your layers.


If you want full control on how the substraction will be done, I recommend that you first resample each image with one by one pixels (chosing bilinear or cubic interpolation to avoid "stair like" artefacts and snapping the extent of the first raster to the second raster). You can store those rasters in_memory if they are not too big to avoid duplicating your data.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...