[GRASS-dev] [GRASS GIS] #2856: i.segment: warning "Region consists of only one cell, nothing to update" slows down module
GRASS GIS
trac at osgeo.org
Sun Feb 21 02:37:05 PST 2016
#2856: i.segment: warning "Region consists of only one cell, nothing to update"
slows down module
--------------------------+------------------------------
Reporter: mlennert | Owner: grass-dev@…
Type: defect | Status: new
Priority: normal | Milestone: 7.0.4
Component: Imagery | Version: svn-trunk
Resolution: | Keywords: i.segment region
CPU: Unspecified | Platform: Unspecified
--------------------------+------------------------------
Comment (by mmetz):
Replying to [comment:2 mmetz]:
> Replying to [ticket:2856 mlennert]:
> > In the NC dataset:
> >
> >
> > {{{
> > g.region n=221318 s=220073 w=637746 e=639646 res=1
> > i.group ortho in=ortho_2001_t792_1m
> > i.segment group=ortho at user1 output=ortho_seg_001 threshold=0.01
memory=2500
> > }}}
> >
> > Then, when I try to use the output of this as seeds for the next
level:
> >
> >
> > {{{
> > i.segment group=ortho at user1 output=ortho_seg_002_seeded threshold=0.02
seed=ortho_seg_001 memory=2500
> > }}}
> >
> > I get tons of
> >
> > {{{
> > WARNING: Region consists of only one cell, nothing to update
> > }}}
> >
> > The module run takes +/- 1m25.
> >
> > When I comment
[https://trac.osgeo.org/grass/browser/grass/trunk/imagery/i.segment/create_isegs.c#L1086
line 1086] in imagery/i.segment/create_isegs.c so that the warning is not
issued, module run only takes about 20s.
> >
> > Is this warning really necessary ? Or is it a bug that it appears in
this context ?
>
> It is a bug that appears in this context. The warning is justified
because it appears only when regions are merged. A merged region must
always consist of more than one cell (merge of two original regions each
consisting of at least one cell). The bug seems to be an inappropriate
call to merge_regions().
No, an inappropriate call to update_band_vals(). Fixed in r67915,6 (trunk,
relbr70).
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/2856#comment:3>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list