[GRASS-stats] readRAST6() error (Windows XP and W2k)
Martin Mainzer
martmai at gmx.de
Thu Nov 5 13:33:31 EST 2009
Hello at all
I use R to do statistics of some GRASS data. On the windows machines (XP
and W2K) there occurred a problem when using the readRAST6 command form
the spgrass6 library. I think the problem is linked to the standard
installation of the GRASS standalone installer (standalone version:
WinGRASS-6.4.0SVN-r39626-1-Setup.exe).
The standalone installer creates a folder named "GIS DataBase" under "My
Documents" (note the blank in the folder name). To test where the
problem is, I renamed the folder to "GISDataBase" and moved it to E:\.
With this configuration everything works fine. I guess there is a
problem with the blank in the folder name that is created during the
installation. But this is just a guess. I hope the experts will find the
problem. Here some information out of R (version 7.10.0) after calling R
via "Rgui.exe" in the wxpython GUI ("cmd" in the lower part of the
window "GRASS GIS Ebenen-Manager"). For the example here I used the
South-Dakota data set. First with the folder name with blanks (the
folder name from the standard installation):
###
> library(spgrass6)
Lade nötiges Paket: sp
Lade nötiges Paket: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.6.2, released 2009/07/31
Path to GDAL shared files: C:/Programme/R/R-2.10.0/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
Path to PROJ.4 shared files: C:/Programme/R/R-2.10.0/library/rgdal/proj
Lade nötiges Paket: XML
GRASS GIS interface loaded with GRASS version: 6.4.0svn
and location: South-Dakota
> gmeta6()
gisdbase E:\martin\daten\GIS DataBase
location South-Dakota
mapset PERMANENT
rows 466
columns 633
north 4928000
south 4914020
west 590010
east 609000
nsres 30
ewres 30
projection +proj=utm +zone=13 +a=6378206.4 +rf=294.9786982 +no_defs
+nadgrids=C:/GRASS-6-SVN/etc/nad/conus +to_meter=1.0
> map <- readRAST6('geology')
Tut mir leid, <DataBase/South-Dakota/PERMANENT/.tmp/geology> ist keine
erlaubte Option
CPL ERROR 4: `E:/martin/daten/GIS
DataBase/South-Dakota/PERMANENT/.tmp/geology' does not exist in the file
system,
and is not recognised as a supported dataset name.
Fehler in .local(.Object, ...) :
`E:/martin/daten/GIS DataBase/South-Dakota/PERMANENT/.tmp/geology'
does not exist in the file system,
and is not recognised as a supported dataset name.
> traceback()
8: .Call("RGDAL_OpenDataset", as.character(filename), TRUE, silent,
PACKAGE = "rgdal")
7: .local(.Object, ...)
6: initialize(value, ...)
5: initialize(value, ...)
4: new("GDALReadOnlyDataset", filename, silent = silent)
3: GDAL.open(fname, silent = silent)
2: readGDAL(rtmpfl11, p4s = getLocationProj(), silent = ignore.stderr)
1: readRAST6("geology")
> sessionInfo()
R version 2.10.0 (2009-10-26)
i386-pc-mingw32
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] spgrass6_0.6-11 XML_2.6-0 rgdal_0.6-20 sp_0.9-44
loaded via a namespace (and not attached):
[1] grid_2.10.0 lattice_0.17-26
## #
And now with a folder name without blanks:
###
> library(spgrass6)
Lade nötiges Paket: sp
Lade nötiges Paket: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.6.2, released 2009/07/31
Path to GDAL shared files: C:/Programme/R/R-2.10.0/library/rgdal/gdal
Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
Path to PROJ.4 shared files: C:/Programme/R/R-2.10.0/library/rgdal/proj
Lade nötiges Paket: XML
GRASS GIS interface loaded with GRASS version: 6.4.0svn
and location: South-Dakota
> gmeta6()
gisdbase E:\GISDataBase
location South-Dakota
mapset PERMANENT
rows 466
columns 633
north 4928000
south 4914020
west 590010
east 609000
nsres 30
ewres 30
projection +proj=utm +zone=13 +a=6378206.4 +rf=294.9786982 +no_defs
+nadgrids=C:/GRASS-6-SVN/etc/nad/conus +to_meter=1.0
> map <- readRAST6('geology')
E:/GISDataBase/South-Dakota/PERMANENT/.tmp/geology has GDAL driver GTiff
and has 466 rows and 633 columns
> traceback()
Kein traceback vefügbar
> sessionInfo()
R version 2.10.0 (2009-10-26)
i386-pc-mingw32
locale:
[1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
[3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
[5] LC_TIME=German_Germany.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] spgrass6_0.6-11 XML_2.6-0 rgdal_0.6-20 sp_0.9-44
loaded via a namespace (and not attached):
[1] grid_2.10.0 lattice_0.17-26
###
I hope this help to solve the problem.
Martin
More information about the grass-stats
mailing list