On Sun, 6 Jan 2013, Jonathan Greenberg wrote:
r-sig-geo'ers: is there a way to use rgdal to look for where the gdal installation is hiding? In other words: if I wanted to write a modified wrapper for some gdal function (e.g. gdal_translate), how do I locate gdal assuming rgdal has been installed? I am correct in assuming rgdal installs GDAL, correct?
Please never assume, just check? If you are thinking of a source install, of course nothing is installed, as GDAL etc. are external dependencies. If you mean the Windows or OSX binary rgdal packages from CRAN, check by looking inside the compressed archive files on CRAN (answer, given many times here, no, they are built static, so rgdal.dll and rgdal.dylib contain all the GDAL etc. binary objects needed to run, nothing more). rgdal does not install any GDAL utility programs etc. for obvious reasons.
rgdal cannot know about the GDAL install, but system("gdal-config") may tell you something on systems with GDAL installed externally. On Windows/OSX with rgdal installed as a CRAN binary, this will probably mean that the GDAL used in rgdal and the external GDAL may differ in version, and this should be checked by the user if it matters.
Hope this clarifies, Roger
--j
-- Roger Bivand Department of Economics, NHH Norwegian School of Economics, Helleveien 30, N-5045 Bergen, Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43 e-mail: [email protected] _______________________________________________ R-sig-Geo mailing list [email protected] https://stat.ethz.ch/mailman/listinfo/r-sig-geo
