[GRASS-dev] i.segment error: Ri is 0

Markus Metz markus.metz.giswork at gmail.com
Mon Jul 1 12:04:16 PDT 2013


On Mon, Jul 1, 2013 at 3:56 PM, Moritz Lennert
<mlennert at club.worldonline.be> wrote:
> Hi Eric and Markus,
>
> Trying to use i.segment in grass7 checked out and compiled a few days ago
> (rev 56918), I came upon the following error and the resulting segments file
> was not created. I can file this as a bug report, but wanted your feedback
> first to see if I'm misusing i.segment somehow. I haven't been able to find
> the error in the source code.
>
> command line:
> time i.segment group=xs out=seg_xs minsize=2 memory=3072 threshold=0.2 --o
>
> error:
> Segmentation converged after 16 iterations.
> Merging segments smaller than 2 cells
> ERREUR :Ri is 0

This should not happen. The ID of a segment is always positive or
negative or NULL (Rast_is_c_null_value())
>
> This is on a mosaic of Worldview 2 images with region specs as follows:
>
>> g.region -p
> projection: 1 (UTM)
> zone:       33
> datum:      wgs84
> ellipsoid:  wgs84
> north:      4876400
> south:      4849792
> west:       610056
> east:       634648
> nsres:      2
> ewres:      2
> rows:       13304
> cols:       12296
> cells:      163585984
>
> The mosaic is only a narrow band within that region, so that actually there
> are only 34,755,878 non-null cells.
>
> Any hints ?

Not really. I created a sample dataset with a MASK leaving only a
narrow diagonal strip and everything went fine. Did you get any other
warnings while running i.segment? I assume you are using 64 bit Linux
with more than 3072 GB RAM and lots of free disk space on the
partition with your GRASS data.

Can you provide data to replicate or commands using one of the sample
datasets to replicate this error?

Markus M


More information about the grass-dev mailing list