[GRASS-git] [OSGeo/grass] 3d418e: r.geomorphon: Refined resolution warning condition...

Denis Ovsienko noreply at github.com
Tue Nov 17 09:25:17 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/OSGeo/grass
  Commit: 3d418ef79dcd755943e7917a19bc2e77b135c10a
      https://github.com/OSGeo/grass/commit/3d418ef79dcd755943e7917a19bc2e77b135c10a
  Author: Denis Ovsienko <denis at ovsienko.info>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

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

  Log Message:
  -----------
  r.geomorphon: Refined resolution warning condition, code cleanups (#1093)

Refine a warning condition for resolution:

In one configuration r.geomorphon would always warn about the resolution
mismatch even after g.region had aligned the region. Apparently, the
four values in the comparison were equal up to 16 decimal places. The
difference seems to come from different calculations producing different
cumulative rounding errors. Add a small (less than 1mm in LatLong
projection) margin to squelch the warning when the difference is
negligible.

Make global_ternary_codes[] static:

The only code that uses the array is in geom.c, so make the array static
and export an initialization function to call from main(). Use a macro
instead of hard-coded constants and get the array size right.

Lose an unused function argument: extends() never used pattern_size, so get rid of it.

Fix W3C HTML validator issues for doc: required attribute "ALT" not specified,
document type does not allow element "H2" here, end tag for "DL" omitted.




More information about the grass-commit mailing list