Select to view content in your preferred language

dem analysis

4390
13
11-06-2013 11:43 AM
spencersawaske
New Contributor
Hello,

I'm having trouble with what I think should be a relatively straightforward analysis of 10 meter dem data.  If you have a minute, could you offer any suggestions. 

I am trying to calculate a sort of "exposure" score for every cell in a raster.  The basic idea is to compare the value of each raster cell with those nearby(200-400m radius).   

E1= (# cells in surrounding area with elev.< cell  elev.)/(# cells in surrounding area with elev.> cell  elev.)
E2= (sum[cell elev.-(elev.of surrounding cells<gage  elev.)])/(sum[(elev.of surrounding cells>cell  elev.)-cell elev.])

For both indices, larger values represent locations with greater exposure and smaller values represent more protected, less exposed locations.  For instance, the E1 value for a location on top of a cone would be infinity, while that for the low point of an inverted cone would be 0.  I've been able to compute these indices for a small number of point locations using a combination of buffer and zonal tools.  Unfortunately, I'm now trying to perform this analysis for every cell in a much larger area(2-3 thousand cells) and my original method is no longer feasible.

I would greatly appreciate any suggestion you could offer.

Thanks,
spencer
0 Kudos
13 Replies
808707
by
Deactivated User
Ahh great thanks for the help Xander. I'll download the 32 bit version and see if that works.
0 Kudos
808707
by
Deactivated User
Hello again. It looks like I got it working. I installed the 32 bit PyScripter and got the same error again. However I realised my DEM had a cell type of float and converted it to an integer and it seems to work okay with a cell size of 10m.

However I would like to see if this will work with a cell size of 0.2m. I tried this and a memory allocation error occurs. The same happened with 1m. Is there a limit to the resolution of the raster?

This got me thinking to this part of the code

# cellsize = 10m, distance of 200m = 20, window size will be 41
# half the window size (20 = 20 pixels * 10m/pixel = 200 meters, moving window = 420 * 420)
winhalf = 20


I was wondering how you calculated that the window size will be 41? and the winhalf will equal 20?
0 Kudos
XanderBakker
Esri Esteemed Contributor
Hi Mark,

Basically the initial idea was a search distance of 200m (actually 200-400m, but I wanted to keep the array small). If you have a pixels size of 10m, a distance of 200m will be 20 pixels. So twenty pixels on each side means 20 * 2 = 40. When using filters and similar calculations, one uses an impair number of pixels to have a central pixel (the one where the value will be assigned). This is why the size is 41 pixels (2 * 20 + 1) and the winhalf is 20 pixels.

Kind regards,

Xander
0 Kudos
808707
by
Deactivated User
Hello Xander. Thanks very much for the information. I'll play around with this some more and see what I can do.
0 Kudos