On Tue, Jul 2, 2013 at 9:58 AM, Moritz Lennert <mlenn...@club.worldonline.be> wrote: > On 01/07/13 21:04, Markus Metz wrote: >> >> On Mon, Jul 1, 2013 at 3:56 PM, Moritz Lennert >> <mlenn...@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. > > > 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