[GRASS-dev] [GRASS GIS] #3453: i.segment.stats add-on : Empty output csv when flags ‘s’ is activated
GRASS GIS
trac at osgeo.org
Sat Nov 25 04:24:29 PST 2017
#3453: i.segment.stats add-on : Empty output csv when flags ‘s’ is activated
-----------------------------+-------------------------
Reporter: tgrippa | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone:
Component: Addons | Version: unspecified
Keywords: i.segment.stats | CPU: Unspecified
Platform: Unspecified |
-----------------------------+-------------------------
Hi, I notice a bug in i.segment.stats. When using the ‘s’ flag, the output
csv is empty (in fact, the header is written, but not the rest of the
file).
I check the code I think the problem comes from L222-225 which are:
{{{
if area_measures:
output_dict[values[0]] = output_dict[values[0]]+ [values[x] for x in
stat_indices]
else:
output_dict[values[0]] = [values[x] for x in stat_indices]
}}}
and shoud be :
{{{
output_dict[values[0]] = output_dict[values[0]]+ [values[x] for x in
stat_indices]
}}}
I make the change on my local version of the add-on and it seems working
as expected.
Also, I noticed the L220 and L221 are duplicates.
Cheers,
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3453>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list