help on rgdal package
I started to use the rgdal package in order to work with DEM files. Since these files are based on non-rectangular quads, there are lots of NA-values in the corresponding datasets. Does anybody know how to remove the NA-values from an object of class GDALDataset in order to get a rectangular dataset? Also, the function saveDataset doesn't seem to work for these kind of data (or at least for me). I get the following error:
x <- new("GDALDataset", "xxx.dem")
getDriverLongName(getDriver(x))
[1] "USGS Optional ASCII DEM"
saveDataset(x,"xxx.data")
Error in .local(.Object, ...) :
GDAL Error 6: GDALDriver::Create() ... no create method implemented for this format.
Or should the dataset be raster data? Then I get:
rd<-getRasterData(x) saveDataset(rd,"test.data")
Error in .assertClass(dataset, "GDALReadOnlyDataset") :
Object is not a member of class GDALReadOnlyDataset
Does anybody see what am I doing wrong? Thanks.
Hana Sevcikova