[GRASS-user] g7 svn58117 r.random ERROR: There aren't [n] non-NULL cells in the current region

Eric Goddard egoddard1010 at gmail.com
Mon Oct 28 12:33:43 PDT 2013


Thanks, Hamish. My machine is 64 bit. Making those changes results in the
same results posted above:
r.random -i --overwrite input=land_cover_classification at PERMANENT n=1000
vector_output=accuracy_assessment_random
Collecting Stats...
Raster:      land_cover_classification at PERMANENT
Cover:       (null)
Cell Count:  -75090892
Null Cells:  2130552315





On Mon, Oct 28, 2013 at 2:01 PM, Hamish <hamish_b at yahoo.com> wrote:

> Eric wrote:
> >> rows:       64019
> >> cols:       65916
> >> cells:      4219876404
>
> 64019 * 65916 > signed 32bit integer so it overflows
>
> is your system+grass 32 or 64 bit?
>
> > Cell Count:  -75090892
> > Null Cells:  2130552315
> >
> > A negative cell count? hmmm....
>
> that may just be a cosmetic issue in the printf'ing of the variables.
>
> the first thing I'd try is to go to line 124 in main.c and (1) remove
> the two casts to (int), then (2) change the two %d to %ld.
> (nCells and nNulls are defined as "long" in local_proto.h)
>
>
> Hamish
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-user/attachments/20131028/3c06a61a/attachment.html>


More information about the grass-user mailing list