I used the rgdal package to open a geoTiff and then manipulate the
data. The result is a 3-dimensional array that I want to convert back
to a SpatialGridDataFrame in order to save it as a geoTiff. I used
the following code:
grd <- GridTopology(gt[,1],gt[,2],gt[,3])
SGDF <-
SpatialGridDataFrame(grd,data=data.frame(c(data)),proj4string=CRS(proj))
Which works fine for a single band image (a 2-Dimensional matrix).
When I used this code on a 3D array, I get the following error:
Error in validityMethod(object) :
unequal number of objects in full grid and data slot
Does anyone have a solution? Thanks.
Jonathan B. Thayn
Ph.D. Candidate Geography and Remote Sensing
University of Kansas
2101 Constant Avenue, Higuchi Hall, Rm 121
Lawrence, Kansas 66047-3759
[EMAIL PROTECTED]
people.ku.edu/~jonthayn
[[alternative HTML version deleted]]
_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo