[GRASS-git] [OSGeo/grass] ebf2de: r.geomorphon: Add two more comparison modes (#1096)

Denis Ovsienko noreply at github.com
Sat Dec 5 20:17:07 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: ebf2de1343ded9eef3dc9e19f2a0f3eb172c76b0
      https://github.com/OSGeo/grass/commit/ebf2de1343ded9eef3dc9e19f2a0f3eb172c76b0
  Author: Denis Ovsienko <denis at ovsienko.info>
  Date:   2020-12-05 (Sat, 05 Dec 2020)

  Changed paths:
    M raster/r.geomorphon/local_proto.h
    M raster/r.geomorphon/main.c
    M raster/r.geomorphon/pattern.c
    M raster/r.geomorphon/r.geomorphon.html

  Log Message:
  -----------
  r.geomorphon: Add two more comparison modes (#1096)

The geomorphon computation includes a procedure done for each of the
eight cardinal directions. The procedure traces through the elevation
data to find the angles of zenith and nadir line of sight and to decide
if the cardinal point is above (1), below (-1) or level (0) with the
central point.

The existing nadir/zenith comparison defaults to 0 when zenith and nadir
angles are exactly equal and at least one angle is over its threshold.
For example, this would be the case if the zenith point was 20 raster
cells away at height +20m and the nadir point was 1 raster cell away at
height -1m. This is much more likely to happen when the elevation data
is low-resolution. Specifically, at 30m raster resolution and 1m
vertical resolution this happened every 1 out of 25 cases on average.

In that edge case the computed distance to the cardinal point remains
0, which results in incorrect derived cartesian coordinates and related
results, most notably azimuth and elongation. Besides that, the
comparison does not specifically check that when it comes to a 1 or -1
result, the corresponding angle is above its threshold.

Address these issues by introducing a new "comparison" command-line
option, in which "anglev1" stands for the exact existing behaviour and
"anglev2" and "anglev2_distance" enable more sophisticated comparison
methods.




More information about the grass-commit mailing list