Hi,
spgrass6, readRAST6 and readVECT6 have a "6" in their name that refers
to GRASS 6. GRASS 7 seems to be quite different from GRASS 6. That, I
suppose, is the cause of what you see.
HTH,
Tom
Am 20.02.2012 18:28, schrieb Eric Momsen:
Hello all,
I'm having troubles getting R to load data from GRASS 7. I suspect I have
installed something wrong, but can't figure out what. Any suggestions for
what I could look for or how to trouble shoot this? Thanks in advance for
any help!
After having other issues last week, we have upgraded Debian to the testing
version. The other problems are solved, but now I can't get readVECT6 and
readRAST6 to work.
I have followed the instructions at http://grass.osgeo.org/wiki/R_statistics -
first under the Debian instructions to use apt-get to install some of the
packages and others via R. After that didn't work, I tried the ctv
package to install the Spatial view (Core only). The results are the same.
I can execute GRASS commands, but the readVECT6 crashes R, and readRAST6
gives an error. (I believe there are probably two separate causes.)
-Eric
(I've left the version numbers here but deleted much of the output
data...spearfish70 is simply spearfish60 after running v.build.all)
Welcome to GRASS 7.0.svn
GRASS 7.0.svn (spearfish70):~> R
R version 2.14.1 (2011-12-22)
Platform: x86_64-pc-linux-gnu (64-bit)
library(spgrass6)
Loading required package: sp
Loading required package: XML
GRASS GIS interface loaded with GRASS version: GRASS 7.0.svn50847M (2012)
and location: spearfish70
gmeta6()
gisdbase /home/shared/research/GRASSDATA
location spearfish70
...etc...
system("g.list vect")
----------------------------------------------
vector files available in mapset<PERMANENT>:
archsites roads t_9961_200 t_9961_500
t_roads_prime
bugsites roads_net t_9961_200_all t_9961_500_all
t_roads_second
...etc...
system("g.list rast")
streams<- readVECT6("streams", type = "line,boundary", remove.duplicates
= FALSE)
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.7.3, released 2010/11/10
Path to GDAL shared files: /usr/share/gdal/1.7
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009, [PJ_VERSION: 470]
Path to PROJ.4 shared files: (autodetected)
GRASS 7.0.svn (spearfish70):~>
Started up R again...and tried readRAST6
spear<- readRAST6(c("elevation.dem", "geology"), cat = c(FALSE, TRUE))
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.7.3, released 2010/11/10
Path to GDAL shared files: /usr/share/gdal/1.7
Loaded PROJ.4 runtime: Rel. 4.7.1, 23 September 2009, [PJ_VERSION: 470]
Path to PROJ.4 shared files: (autodetected)
Command: r.info
Description: Outputs basic information about a raster map.
Keywords: raster, metadata, history
Parameters:
name: map, type: string, required: yes, multiple: no
keydesc: name, keydesc_count: 1
[Name of raster map]
Flags:
name: g [Print raster array information only] {FALSE}
name: r [Print range only] {FALSE}
name: e [Print extended metadata information only] {FALSE}
name: h [Print raster history instead of info] {FALSE}
name: verbose [Verbose module output] {FALSE}
name: quiet [Quiet module output] {FALSE}
Error in doGRASS(cmd, flags = flags, ..., parameters = parameters, echoCmd
= echoCmd) :
Invalid flag value: t
....so I tried running r.info which runs fine....
system("r.info map=elevation.dem@PERMANENT")
+----------------------------------------------------------------------------+
| Layer: elevation.dem@PERMANENT Date: Tue Mar 14 07:15:44 1989
|
| Mapset: PERMANENT Login of Creator: grass
|
| Location: spearfish70
|
| DataBase: /home/shared/research/GRASSDATA
|
| Title: DEM (7.5 minute) ( elevation )
|
....etc....
[[alternative HTML version deleted]]
_______________________________________________
R-SIG-Debian mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-debian
_______________________________________________
R-SIG-Debian mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-debian