Opened 6 years ago

Last modified 2 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 6 years ago.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by mlennert

comment:1 in reply to:  description Changed 6 years ago by zarch

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 Changed 6 years ago by martinl

Milestone: 7.0.47.0.5

comment:3 Changed 5 years ago by neteler

Milestone: 7.0.57.0.6

comment:4 Changed 4 years ago by neteler

Milestone: 7.0.67.0.7

comment:5 Changed 3 years ago by martinl

Still relevant?

comment:6 Changed 3 years ago by martinl

Milestone: 7.0.7

Remove Milestone from Addons bugreports.

comment:7 Changed 2 years ago by neteler

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