calculating directional derivative and the gradient

5210
3
02-20-2015 09:51 PM
davesacco
New Contributor II

Hi,

 

I'm looking to calculate the slope of a raster in a specific direction. For example: if i am standing at a point and facing NE (45 degrees), what is the slope I would be looking up.

 

The math is not to bad, there's a great illustration here: An introduction to the directional derivative and the gradient - Math Insight

 

What I don't know how to do is calculate derivatives in arcgis.

 

Any help would be greatly appreciated.

 

Thanks,

Dave

0 Kudos
3 Replies
JayantaPoddar
MVP Esteemed Contributor

Hi Dave,

I don't have knowledge on Directional derivetives.

Check the link below, which also mentions computation of directional derivative in ArcGIS (they used ver. 8.x),

Arc8.1 ArcMap Commands for Computing USPED using GIS

Hope it is helpful!

Thanks,

Jay



Think Location
0 Kudos
DarrenWiens2
MVP Honored Contributor

Dave, full disclosure, I'm not familiar with directional derivatives and probably not going to read the entire article in your link (too long). Are you looking for the slope to the horizon at the given bearing, or the slope at some distance from a point along the bearing, or neither?

0 Kudos
DanPatterson_Retired
MVP Emeritus

In theory, it should be the slope in a particular direction, however, the way slope is calculated isn't how slope is calculate in math... basically you want dy/dx in a particular direction... so see if you can give this a translate, most of the stuff looks like conversion of aspect to math orientation and some convertion to radians (ie    0.1745)

sooo... leaving out all the other bumph before step 6, it boils down to

blah blah .... but check anyway

make a slope and aspect raster qsx_slope, qsx_aspect

6. Raster Calculator

  Build an expression
          qsx_dx =  Cos((([qsx_aspect] * (-1)) + 450) * .01745) * Tan([qsx_slope] * .01745)

  Build an expression

        qsy_dy =  Sin((([qsy_aspect] * (-1)) + 450) * .01745) * Tan([qsy_slope] * .01745)

It should be pointed out that

The slope value of this plane is calculated using the average maximum technique (see References). The direction the plane faces is the aspect for the processing cell.

Where the slope is calculated using the method described by Burroughs in the references

The values of the center cell and its eight neighbors determine the horizontal and vertical deltas. The neighbors are identified as letters from a to i, with e representing the cell for which the aspect is being calculated.

Surface window
Surface scanning window

The rate of change in the x direction for cell e is calculated with the following algorithm:

  [dz/dx] = ((c + 2f + i) - (a + 2d + g) / (8 * x_cellsize)

The rate of change in the y direction for cell e is calculated with the following algorithm:

  [dz/dy] = ((g + 2h + i) - (a + 2b + c)) / (8 * y_cellsize)

Which technically is the slope in that particular direction, but close enough.

and if you are interested in sheet erosion

erdep = [qsx_dx] + [qsy_dy] for prevailing rill erosion
or
erdep =  ([qsx_dx] + [qsy_dy]) * 10. for prevailing sheet erosion

0 Kudos