[GRASS-stats] Converting an SpatialGridDataFrame to an imgdata object

Nikos Alexandris nik at nikosalexandris.net
Tue Feb 26 02:36:06 PST 2013


S. Koukoulas wrote:

> Perhaps what you need to look at, is how to Convert a
> SpatialGridDataFrame to a matrix (or to an array if there are more than
> one bands). It seems that biOps uses simple matrices/arrays for its
> image objects. if you google it you should find some   responses to
> earlier requests send to R-SIG-geo.
> 
> alternatively, you could import directly to biOps your image as tiff
> from your system's disk space.

Thanks Sotiri,

once again, delivery deadlines approaching, and I froze it.  I was playing for 
a while with conversions like the one you propose ( ...indeed, found many 
relevant posts).

Note, doing it in a pure TIFF (that would likely loose its spatial reference 
metadata) would require an additional step outside of R/GRASS to get the SRS 
attached back in an identical, regarding the spatial resolution and extent, 
TIFF. So as to get an GeoTIFF (again).

Thus,  I would prefer playing inside GRASS -> R -> GRASS only.

Thank you, Nikos



More information about the grass-stats mailing list