Opened 6 years ago

Last modified 6 years ago

#3839 new defect

r.watershed usage inconsistency

Reported by: martinl Owned by: grass-dev@…
Priority: normal Milestone: 7.6.2
Component: Raster Version: svn-trunk
Keywords: r.watershed Cc:
CPU: Unspecified Platform: Unspecified

Description

r.watershed source code says

    /* Check for some output map */
    if ((opt8->answer == NULL)
	&& (opt9->answer == NULL)
	&& (opt10->answer == NULL)
	&& (opt11->answer == NULL)
	&& (opt12->answer == NULL)
	&& (opt14->answer == NULL)
	&& (opt15->answer == NULL)) {
	G_fatal_error(_("Sorry, you must choose an output map."));
    }

but there are more output raster maps defined, eg.

    opt13 = G_define_standard_option(G_OPT_R_OUTPUT);
    opt13->key = "length_slope";
    opt13->label = _("Name for output slope length raster map");
    opt13->description = _("Slope length and steepness (LS) factor for USLE");
    opt13->required = NO;
    opt13->guisection = _("Outputs");

Change History (4)

comment:1 by martinl, 6 years ago

In 74452:

r.watershed usage inconsistency, see #3839

comment:2 by martinl, 6 years ago

Should be fixed in r74452:

r.watershed elev=dem
...
ERROR: At least one of the following options is required: <accumulation>, <tci>, <spi>, <drainage>, <basin>, <stream>, <half_basin>, <length_slope> and <slope_steepness>

Also threshold check improved:

r.watershed elev=dem basin=x
...
ERROR: Option <basin> requires <threshold>

comment:3 by martinl, 6 years ago

If no objection I will backport r74452 to GRASS76 release branch.

in reply to:  3 comment:4 by mmetz, 6 years ago

Replying to martinl:

If no objection I will backport r74452 to GRASS76 release branch.

Looks good to me.

Note: See TracTickets for help on using tickets.