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/.
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().
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
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-stats
_______________________________________________
grass-stats mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-stats