[GRASS-stats] Error rgrass7 using readRAST()
Roger Bivand
Roger.Bivand at nhh.no
Wed Mar 18 08:48:28 PDT 2015
On Wed, 18 Mar 2015, Francesco Tonini wrote:
> Roger,
>
> Apparently the error was due to a mismatch with the default g.region. After
> checking in GRASS for g.region -p I found that it was set to 100 x 101
> columns. If any of you ever encounter the same problem, just make sure to set
> the g.region using the same input raster of interest, i.e. using g.region
> raster=/your_raster_name/.
OK, thanks for reporting the resolution. readRAST() does use the current
region, as does r.out.bin internally.
>
> Are there any plans to make use of the 'raster' package so that readRAST()
> reads a 'raster' R obj instead of a sp griddataframe? Same for writeRAST().
>
It has been mentioned, but nobody has contributed anything. Maybe the
temporal functions from the "spacetime" package will move, again, no
contributions received yet.
Best wishes,
Roger
> Thank you,
> Francesco
>
>
>
>
> On 3/18/2015 11:32 AM, Roger Bivand wrote:
>> On Wed, 18 Mar 2015, Francesco Tonini wrote:
>>
>> > Dear all,
>> >
>> > I am testing rgrass7 and trying to read a single raster file calling R
>> > from GRASS. I am using the function readRAST(). Currently, this return a
>> > SpatialGridDataFrame R object but it seems to have a bug when reading
>> > the correct number of observations. In my case the input raster is 100 x
>> > 100 so it should have 10,000 observations (ncell). Instead, readRAST()
>> > read 100 x 101 with 10,100 observations. Did anybody encounter this
>> > issue or know what it could be caused by?
>> > I can send over my input raster if that helps to test on your machines.
>>
>> Please make an archive file of (parts of) your location, including all the
>> upper-level files, but maybe excluding other data than the raster file in
>> question. In the packaged location, the same problem should occur. Put the
>> archive file somewhere from which it can be downloaded. I'll take a look.
>>
>> Roger
>>
>> >
>> > Any help is much appreciated.
>> >
>> > Thank you.
>> > Francesco
>> > _______________________________________________
>> > grass-stats mailing list
>> > grass-stats at lists.osgeo.org
>> > http://lists.osgeo.org/mailman/listinfo/grass-stats
>> >
>>
>
>
>
--
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 91 00
e-mail: Roger.Bivand at nhh.no
More information about the grass-stats
mailing list