[GRASS-git] [OSGeo/grass] 3b89e4: r.random: Add -s flag, remove -i flag, redo interf...

Vaclav Petras noreply at github.com
Fri Nov 12 18:28:58 PST 2021

  Branch: refs/heads/main
  Home:   https://github.com/OSGeo/grass
  Commit: 3b89e4740478389f542b65b6c188105a0da93044
  Author: Vaclav Petras <wenzeslaus at gmail.com>
  Date:   2021-11-12 (Fri, 12 Nov 2021)

  Changed paths:
    R raster/r.random/README
    M raster/r.random/local_proto.h
    M raster/r.random/main.c
    M raster/r.random/r.random.html
    M raster/r.random/support.c
    M raster/r.random/testsuite/test_r_random.py
    M raster/r.random/testsuite/testrandom.py

  Log Message:
  r.random: Add -s flag, remove -i flag, redo interface (#1054)

A new flag -s is added similarly to r.mapcalc where either seed or -s
is required, i.e., user needs to explicitly ask for a generated random seed
or provide a fixed one. Store seed to history (esp. useful when generated).
The long type used for the seed is not portable, but that's what is used in the library function.

The -i flag for (only) printing cell counts is removed. The warning about that
possibly happening was in the documentation. r.univar added as a primary suggested
way of obtaining that info. The flag just makes the interface more complicated
and another module can be used instead of running this module twice.

This also changes -z flag to -n and -d to -z. Flag z is more common for adding Z coordinate than obsolete association
where zero is now null. -d was used for Z coordinate, so -z now has different
meaning than before. The flag letter is replaced by n and what was Z coordinate (d)
can now be z.

The original sections were Required, Optional, and Points with points
having only one entry. Now all options and flags are split between
Input and Output with Optional having only the standard long flags.

This also updates r.random interface so that it takes advantage of parser features namely
the option dependencies.

Use current terminology in documentation (raster map, but not raster map layer,
no sites, but vector points or vector point map). Restructure doc and add sections.
Tell what is the role of the raster (input/cover).

More information about the grass-commit mailing list