[GRASS-stats] readRAST6 and readVECT6 errors with grass70
Eric Momsen
eric.momsen at gmail.com
Tue Mar 6 14:31:19 EST 2012
Hello!
I have been trying to get spgrass6 working in a Debian environment,
and have started from scratch with both GRASS 6.4.3 and GRASS 7.0. I
previously had the same errors in "old" installations of both 6 and 7,
after following the advice in the listserve archive I am half way
there. Since the behavior had been the same for both, I was suprised
it didn't resolve the issue completely! Any suggestions would be
appreciated.
I hope it is OK to include all 3 questions here, since they all relate
to spgrass6. Here is a listing of sessionInfo and various Debian
package versions: http://pastebin.com/68XST1vK
My installation of spgrass6 is working now with GRASS 6.4.3, I can
read and write vectors and rasters.
1. I am getting one warning message, is this OK, or am I missing some
dependency still?
> spear <- readRAST6(c("elevation.dem", "geology"), cat = c(FALSE, TRUE))
Warning message:
statistics not supported by this driver
The program does continue to successfully import the data.
Moving onto GRASS 7:
2. readRAST6 gives an error in grass70, output as follows:
> spear <- readRAST6(c("geology", "elevation.dem"), cat=c(TRUE, FALSE),
+ useGDAL=FALSE)
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
I checked that r.info works:
> system("r.info geology")
+----------------------------------------------------------------------------+
| Layer: geology Date: Mon May 4 10:00:14 1987 : |
| Mapset: PERMANENT Login of Creator: grass |
| Location: spearfish70
.
.
.
I see that -t is in the GRASS6.4.3 version of r.info, but not in the
GRASS7.0 version of r.info.
I'm not sure what to do next here.
3. readVECT6 causes R to exit.
> bugsDF <- readVECT6("bugsites")
GRASS 7.0.svn (spearfish70):~ >
I went back to check that the bugsites map was available:
> system("v.info bugsites")
+----------------------------------------------------------------------------+
| Name: bugsites |
| Mapset: PERMANENT |
| Location: spearfish70 |
| Database: /home/shared/research/GRASSDATA |
.
.
.
And then tried the debug tool to see where things went wrong...
complete output at: http://pastebin.com/dJFsRSBC with the final lines as:
debug: res <- readOGR(dsn, layer = as.character(layer), verbose =
!ignore.stderr,
pointDropZ = pointDropZ)
Browse[2]>
GRASS 7.0.svn (spearfish70):~ >
I found a 2009 post regarding readOGR / readVECT6 and some versioning
issues: https://stat.ethz.ch/pipermail/r-sig-geo/2009-April/005553.html
but I installed both rgdal and spgrass6 inside of R as packages. So
I'm not sure if this older post is still applicable, especially since
it works in GRASS 6.4.3. Any suggestions for what to try next?
Thanks in advance for any help provided.
Eric
More information about the grass-stats
mailing list