wschwanghart / topotoolbox

A MATLAB software for the analysis of digital elevation models -
https://topotoolbox.wordpress.com/
153 stars 89 forks source link

curvature: Fix inaccuracies in the implemented Evans method #20

Closed hawahee closed 2 years ago

hawahee commented 3 years ago

Looking through Schmidt et al. (2003) I found what I believe to be 3 small inaccuracies in curvature.m:

  1. As far as I can tell the gradient function is not producing the desired fx and fy for the Evans method, using only 2 neighbours rather than the desired 6. Additionally, gradient calculates fx in the opposite direction.
  2. It seems like + 2 * fx .* fy .* fxy should be - 2 * fx .* fy .* fxy in the tangential curvature.
  3. It seems like + 2 * fx .* fy .* fxy should be - 2 * fx .* fy .* fxy in the planform curvature.

I am not an expert, so please let me know if I am mistaken.