[STATSGRASS] gmeta6() returns empty string

Tilmann Steinmetz tilmann.steinmetz at geo.uni-halle.de
Tue Feb 27 14:36:08 EST 2007


Hi,

I am having difficulties getting the region environment settings from grass 
into R using gmeta6() (see output below).

The installed packages are as follows:
>
> sessionInfo()
R version 2.4.0 (2006-10-03)
i386-portbld-freebsd5.4

locale:
C

attached base packages:
[1] "methods"   "stats"     "graphics"  "grDevices" "utils"     "datasets"
[7] "base"

other attached packages:
spgrass6    rgdal maptools  foreign       sp
 "0.3-6"  "0.5-6"  "0.6-8" "0.8-18"  "0.9-8"
> 


When I start R from within the Grass (6.2.1) shell (with spearfish6 
location) 
I encounter the following:

> library(spgrass6)
Loading required package: sp
Loading required package: maptools
Loading required package: foreign
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
> g.region -d
Error: object "g.region" not found
> gmeta6()
ERROR: default region is invalid
       line 11: <top: 1>
/libexec/ld-elf.so.1: g.proj: Undefined symbol "G_gettext"
Error in if (is.na(projstr)) uprojargs <- projstr else uprojargs <- 
paste(unique(unlist(strsplit(projstr,  :
        argument is of length zero
> 
                                  
The problem seems to arise from an empty default region in GRASS:

> system("g.region -d")
ERROR: default region is invalid
       line 11: <top: 1>

> traceback()
2: getLocationProj()
1: gmeta6()

          
I can go back to GRASS and say g.region -p which shows me the region 
settings 
alright and when I call g.region -d it returns an empty string. This is most 
peculiar since I double-checked DEFAULT_WIND is there and non-empty. This 
behaviour is the same for my own location irrespective of projection or 
whatever. (I just reinstalled Spearfish6 to make sure its not something with 
access permissions or such). 

I'd be most grateful for any help with this. I even tried to hardcode my 
projection into spgrass6 in order to get this to work (unsuccessfully 
though) 
But I could live with that for the moment. Any hints? 

Thanks,
Tilmann




More information about the grass-stats mailing list