Opened 8 years ago

Last modified 4 years ago

#2914 new defect

i.segment.hierarchical: the outputs_prefix option should not require formatting string

Reported by: mlennert Owned by: grass-dev@…
Priority: normal Milestone: 7.8.3
Component: Addons Version: unspecified
Keywords: i.segment.hierarchical output prefix Cc:
CPU: Unspecified Platform: Unspecified

Description

In i.segment.hierarchical, the outputs_prefix is defined as

outputs_prefix=string
    Name for output raster maps from segment
    Default: seg__%.2f

The way this parameter is used in the code, it requires a formatting string as present in the default. However, this is not clearly documented (except implicitly through the default value), and IMHO shouldn't be required. The formatting information should be added in the code, not by the user as is usual custom in GRASS modules.

I'll attach a patch shows a possible solution, but I'll wait for Pietro to comment on that before committing.

Attachments (1)

i_segment_hierarchical_outputsprefix.diff (878 bytes ) - added by mlennert 8 years ago.

Download all attachments as: .zip

Change History (8)

in reply to:  description comment:1 by zarch, 8 years ago

Replying to mlennert:

In i.segment.hierarchical, the outputs_prefix is defined as

outputs_prefix=string
    Name for output raster maps from segment
    Default: seg__%.2f

The way this parameter is used in the code, it requires a formatting string as present in the default. However, this is not clearly documented (except implicitly through the default value), and IMHO shouldn't be required. The formatting information should be added in the code, not by the user as is usual custom in GRASS modules.

Formatting strings are much more flexible but I agree that it is unusual, so please apply your changes.

comment:2 by martinl, 8 years ago

Milestone: 7.0.47.0.5

comment:3 by neteler, 8 years ago

Milestone: 7.0.57.0.6

comment:4 by neteler, 6 years ago

Milestone: 7.0.67.0.7

comment:5 by martinl, 5 years ago

Still relevant?

comment:6 by martinl, 5 years ago

Milestone: 7.0.7

Remove Milestone from Addons bugreports.

comment:7 by neteler, 4 years ago

Milestone: 7.8.3
Note: See TracTickets for help on using tickets.