[R] bug in readRAST6 function in package spgrass6

Rainer M Krug r.m.krug at gmail.com
Fri Aug 1 18:08:45 CEST 2008


On Fri, Aug 1, 2008 at 6:03 PM, Roger Bivand <Roger.Bivand at nhh.no> wrote:
> On Fri, 1 Aug 2008, Rainer M Krug wrote:
>
>> Hi
>>
>> if I try to import a raster layer which consists only of NULL values
>> from grass by using the  readRAST6, I get an error message:
>>
>>
>>> readRAST6("HSericea_seedsDisperse_2007")
>>
>> ERROR: Invalid value for null (integers only)
>> Error in readBinGrid(rtmpfl11, colname = vname[i], proj4string = p4,
>> integer = to_int) :
>>  no such file:
>>
>> /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/.tmp/ecolmod/HSericea_seedsDisperse_2007
>>
>
> Please use the statgrass list for questions like this.

Thank's for the pro,mpt response - I'll do so th next time.

>
> Examination of readRAST6() shows that if the NODATA= argument is not given,
> it is set to one less than the minimum data value. You have no data at all,
> so the heuristic fails. Set NODATA= and it should work.

Thanks for the tip.

>
> Not a bug, rasters can reasonably be assumed to have data. If you like, on
> the appropriate list document a small case for which the heuristic should be
> changed to assign an arbitrary NODATA= (outside the range of the data) using
> information from r.info or other GRASS commands

I'll do so in a few minute.

>
> Roger
>
>>
>> Thanks
>>
>> Rainer
>>
>>
>> --
>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
>> Biology, UCT), Dipl. Phys. (Germany)
>>
>> Centre of Excellence for Invasion Biology
>> Faculty of Science
>> Natural Sciences Building
>> Private Bag X1
>> University of Stellenbosch
>> Matieland 7602
>> South Africa
>>
>
> --
> Roger Bivand
> Economic Geography Section, Department of Economics, Norwegian School of
> Economics and Business Administration, Helleveien 30, N-5045 Bergen,
> Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
> e-mail: Roger.Bivand at nhh.no
>
>



-- 
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Faculty of Science
Natural Sciences Building
Private Bag X1
University of Stellenbosch
Matieland 7602
South Africa



More information about the R-help mailing list