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

2013-07-02 Thread Markus Metz
On Tue, Jul 2, 2013 at 9:58 AM, Moritz Lennert
 wrote:
> On 01/07/13 21:04, Markus Metz wrote:
>>
>> On Mon, Jul 1, 2013 at 3:56 PM, Moritz Lennert
>>   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.
>
>
> I did not use a mask, the non-relevant cells were just nulls. Would it be
> better to create a mask ?

No, i.segment tests with Rast_is_d_null_value() which is true for both
NULL cells and MASK'ed cells.
>>
>> Can you provide data to replicate or commands using one of the sample
>> datasets to replicate this error?
>
>
> I'll run the segmentation again without having something else running. If I
> can reproduce the error, I'll make the data available to you so you can
> test.

Other processes should not be able to interfere, as long as enough
system resources are available which seems to be the case. I suspect a
problem with nodata handling, but the code looks ok to me.

If need be, you can send me (a link to) the test data off-list.

Markus M
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


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

2013-07-02 Thread Moritz Lennert

On 01/07/13 21:04, Markus Metz wrote:

On Mon, Jul 1, 2013 at 3:56 PM, Moritz Lennert
  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.


I did not use a mask, the non-relevant cells were just nulls. Would it 
be better to create a mask ?



Did you get any other
warnings while running i.segment?


No.


I assume you are using 64 bit Linux


$ uname -srvm
Linux 3.2.0-4.drm-amd64 #1 SMP Debian 3.2.35-3~jcristau.1 x86_64
(Intel i3)


with more than 3072 GB RAM


Yes. I have 8GB. There were two segmentation processes running at the 
same time, both with memory=3072. The other process ran without error 
(but on a smaller region and image).



and lots of free disk space on the
partition with your GRASS data.


61G on the data partition.



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


I'll run the segmentation again without having something else running. 
If I can reproduce the error, I'll make the data available to you so you 
can test.


Thanks !

Moritz
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


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

2013-07-01 Thread nik
[..]

Markus Metz wrote:
> 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.

Sorry for breaking the flow here :-/.

Besides the "memory=" parameter, could/would it be useful for "i.segment" to 
provide an option to make use of an external directory where to store 
temporary files?  Like in "r.viewshed stream_dir="?

Thanks, Nikos
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


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

2013-07-01 Thread Markus Metz
On Mon, Jul 1, 2013 at 3:56 PM, Moritz Lennert
 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
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev


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

2013-07-01 Thread Moritz Lennert

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 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 ?

Moritz
___
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev