Hi All,<br> A colleague tipped me off to an article in Forestry Source entitled "When GIS Slope Isn't What You Think" showing differences between field measured slope values and GIS results. The differences can be substantial. The short and long of it is that local hydrologic slope is closer to what's used in the field by foresters than the integrated slope from either Horn or Zevenbergen-Thorne.<br>
And so, I have a feature request. I would like to add hydrologic slope to gdaldem. This is max local slope rather than integrated 9 cell slope like the existing code:<br><br>The existing code for Horn, e.g. is:<br>
<br> dx = ((afWin[0] + afWin[3] + afWin[3] + afWin[6]) - <br> (afWin[2] + afWin[5] + afWin[5] + afWin[8]))/psData->ewres;<br><br> dy = ((afWin[6] + afWin[7] + afWin[7] + afWin[8]) - <br> (afWin[0] + afWin[1] + afWin[1] + afWin[2]))/psData->nsres;<br>
<br>I'd like something more like this (adapted from roughness):<br><br>float GDALSlopeHydroAlg (float* afWin, float fDstNoDataValue, void* pData)<br>{<br> // Hydrologic Slope is the max<br> // local slope btw center cell and adjacent cells<br>
<br> float pafLocalMax = afWin[0];<br><br> for ( int k = 1; k < 9; k++)<br> {<br> if (afWin[k] > pafLocalMax)<br> {<br> pafLocalMax=afWin[k];<br> }<br> }<br> return pafLocalMax - afWin[4];<br>
}<br><br>Any critques? Reasons to not add?<br>
<br>Best,<br>Steve<br><br>Stephen Mather<br>GIS Manager<br>Cleveland Metroparks<br>4101 Fulton Pkwy<br>Cleveland, OH<br>44144<br>