[GRASSLIST:4527] Re: r.stats -z problem

Roy Sanderson R.A.Sanderson at newcastle.ac.uk
Wed Sep 18 05:44:30 EDT 2002


Thanks for the info. It seems somewhat unfortunate that the -z option has
been deleted (quite apart from the mis-leading g.manual page), as Grass5
now requires two commands where only one was required before.  In our maps
the zeros are true zeros, not nulls.  As my colleagues use r.stats with the
-z option regularly in complex scripts that take data to and from various
custom-made external C programs, all these scripts will now need editing to
make them GRASS5-compliant, and they will run more slowly as a result of
the extra r.null commands.

Roy

At 19:23 17/09/02 +0100, Glynn Clements wrote:
>
>Roy Sanderson wrote:
>
>> I'm hitting a fundamental problem using r.stats on GRASS5.0pre5.  r.stats
>> -z is listed as on option on the man page (ignore zero values), but when
>> r.stats is used with -z as one of the options it fails, and advises that -z
>> is not a valid option.  The values I want to exclude are all zero values
>> (NULLS are not relevant as there are none in the map).
>
>r.stats doesn't have an option to exclude specific categories. The
>"-z" flag used to exist when zero was (sometimes) used as a null
>value. Once GRASS supported distinct null values, the behaviour (and
>the flag) were changed.
>
>Either replace zero with null (using r.null), or generate a
>reclassified map with zero replaced by null (using r.reclass).
>
>-- 
>Glynn Clements <glynn.clements at virgin.net>
>
>



More information about the grass-user mailing list