Thursday 13 February 2020

dem - Calculating cells elevation (height) above nearest stream cell using ArcGIS Spatial Analyst


I have searched for some ideas on how to formulate this analysis, but have come up short. I imagine there is a pretty straight forward answer; any help would be greatly appreciates.


Data: DEM, 1/9th arc second (~10-meter), 239,891,470 cells, projected; Streams, National Hydrology Data set, high resolutions, 9,470 features vector; Streams, Same as above, but converted to a raster


Problem: Need to create a raster of the same resolution and extent as the DEM where each cells's value is its height (in meters) above the nearest stream (line or cell).


I am working with ArcGIS 10.1 with spatial analyst. I would prefer to run this analysis in Python, but can do it in R if it is easier.


Edit to clarify: each cell in my stream raster has the value of the elevation at that point. All cells that are not within a stream have a value of zero. For every cell in the extent of the DEM, I am looking to find the nearest stream cell and subtract the value of that cell (the elevation) from the elevation of the cell being analyzed. Calculate the difference in elevation between each cell and the nearest cell representing a stream.



Answer



@whuber has it right when they commented:



If "nearest" means in terms of distance on the map, then just subtract the Euclidean allocation of the stream elevations from the DEM. The procedure is illustrated in an answer to a related question.




First, get the euclidean allocation. Second, use the minus operation to get the difference between the two.


Can be easily done in python.


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...