Using ArcGIS 10.5.1 - I have a raster with certain values (elevation in this case). I'd like to generate a raster that is based on each cell subtracted from its neighboring cell (the one to the direct left). Is there a function that would do this? Example:
Input raster:
- 6 16 14
- 6 10 14
- 8 10 14
- No Data 10 -2
- No Data 4 4
- No Data 2 4
Desired output raster:
Used Raster --> Float. Here is my header file
Answer
If you do not want use python then this can be done with model builder, by shifting the grid left by 1 pixel, do the maths then shifting it back. Doing this introduces a column of nodata on the right so the final step is to use the original clip to clip it back to the original size.
The model would be:
The important thing is to set the environment setting of the minus tool to be the union of the extents of the original and shifted grid, this allows the no data column to be created.


No comments:
Post a Comment