file format error with R and GRASS61
On 19-Jan-06, at 16:30, Kirk R. Wythers wrote:
On Jan 19, 2006, at 3:06 PM, Roger Bivand wrote:
On Thu, 19 Jan 2006, Kirk R. Wythers wrote:
I am trying to figure out an GDAL error message about grass file not being a supported format. The message is:
...
If r.out.gdal works for you on that file, then we have a problem. However, I think that your GRASS GDAL plugin is not present, so GDAL doesn't know how to read GRASS rasters natively. What does
getGDALDriverNames()
say within R after loading the rgdal package, or equivalently $ gdalinfo --formats from the shell prompt? If you see "GRASS" there, we have a problem, if not, please make sure the GDAL GRASS plugin is installed and working (one does this *after* installing GRASS.
That was it Roger. Thanks. I was sure that I had the plugin installed, but after rebuilding gdal-withgrass and reinstalling, read.GDAL ran just fine.
Great to hear that you got it working! The procedure Roger was referring to for making everyone play correctly is slightly different, however, assuming I'm interpreting your message correctly. So to make sure it's archived in the mailing list, here's what I've gathered is now the way to go (same idea for getting GRASS support fully functional in QGIS, by the way): - build and install GDAL WITHOUT GRASS support - build and install GRASS - download the separate gdal-grass plugin that is available at the gdal site (as of this writing, that's http://www.gdal.org/dl/gdal- grass-1.3.1.1.tar.gz ) and compile that, and the make install process in that directory will insert just the GRASS driver into your existing GDAL tree Then GDAL called from 3rd applications, e.g. R or QGIS, should be able to read GRASS rasters. I don't know/can't remember whether this essentially does the same thing as what you did (i.e. I'm assuming you've recompiled the full GDAL after GRASS with GRASS functionality turned on), or if there's a functional difference. In any case, it's simpler, and is designed to avoid circular dependency problems. Cheers, Scott Mitchell ---- Scott Mitchell, Assistant Professor, Carleton University Department of Geography & Environmental Studies, Loeb A209 Mailing: Loeb B349, 1125 Colonel By Dr., Ottawa, ON K1S 5B6 Canada 1-613-520-2600 x2695 Fax: 613-520-4301 Scott_Mitchell at carleton.ca