[STATSGRASS] NULL values and readRAST6
Markus Neteler
neteler at itc.it
Tue Oct 9 07:55:38 EDT 2007
Roger Bivand wrote:
>
> On Tue, 9 Oct 2007, Roger Bivand wrote:
>> On Tue, 9 Oct 2007, Carlos "Guâno" Grohmann wrote:
>>
>>> Hi,
>>> Can readRAST6 handle NULL values? How?
>>>
>>> I tried NODATA=NULL but it needs a numeric value..
>>
>> This is passed to r.out.bin, which says:
>>
>> null=integer
>> Value to write out for null
>> Default: 0
>>
>> so in fact it has to be an integer - I'll fix the documentation and
>> function
>> (which didn't check what value was assigned to NODATA).
>
> To make this a bit clearer - the raster layer in GRASS has missing values
> set to NULL, but NULL cannot be exported by r.out.bin. So r.out.bin is
> given a NODATA value to assign to NULL cells, which are then read into R,
> and the NODATA valued cells are set to NA. The only need for the value is
> to keep r.out.bin (and r.in.bin) happy, because they do not encode NULL
> directly.
>
> Roger
>
Could this be automated by using
r.info -r map
to get the range and then auto-use a value outside
of this range as NULL encoder and something in R with
min()/max() to do the same in the other direction?
But maybe I misunderstand the problem.
Markus
--
View this message in context: http://www.nabble.com/NULL-values-and-readRAST6-tf4593303.html#a13114083
Sent from the Grass - Stats mailing list archive at Nabble.com.
More information about the grass-stats
mailing list