On Thu, 10 Jun 2010, Dave Roberts wrote:
Friends,
I recently became a GRASS convert. I have been an R user for a long time,
so naturally I have tried spgrass6. Unfortunately I have yet to get it to
work. The beginning goes well
From the versions, it looks at though everything is rather aged. Upgrading
may help - did you install binary packages, I guess you must have, because
current source releases are GRASS 6.4.0 RC6, GDAL 1.7.2, and PROJ 4.7.0.
Workaround below.
library(spgrass6)
Loading required package: sp
Loading required package: rgdal
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.5.3, released 2008/09/09
Path to GDAL shared files: /usr/share/gdal
Loaded PROJ.4 runtime: Rel. 4.6.1, 21 August 2008
Path to PROJ.4 shared files: (autodetected)
Loading required package: XML
GRASS GIS interface loaded with GRASS version: 6.3.0
and location: grte
but then (despite the reference to PROJ.4 above) when I try and get a raster
into R I get an error
test <- readRAST6('elev_30')
Error in .local(.Object, ...) :
GDAL Error 1: libproj.so: cannot open shared object file: No such
file or directory
Look at the arguments to readRAST6. If you set useGDAL=FALSE, the data
will be copied to a simple binary file, and the GRASS r.out.gdal command
will not be used.
Do the examples in readGDAL in rgdal work correctly? Do those in
spTransform work correctly? If so, the GDAL/PROJ problem is most likely
affecting the GDAL and/or PROJ versions used to build the r.out.gdal
binary.
Hope this helps,
Roger
but it appears to be there (twice actually)
system('find /usr -name libproj.so')
/usr/local/lib/libproj.so
/usr/lib/libproj.so
I copied it from usr/local/lib to usr/lib thinking maybe it wasn't looking at
the right path, but it doesn't seem to find it in either location. This
appears to be a GDAL error, rather than an R or spgrass6 error, but GRASS
runs fine.
FWIW I'm running Fedora 10 x86_64, GRASS 6.3, GDAL 1.5.3, PROJ.4 4.6.1
Thanks in advance for any help, Dave
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: roger.biv...@nhh.no
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo