Skip to content
Prev 10521 / 29559 Next

Installing rgdal on OSX (was digest ...)

On Thu, 23 Dec 2010, Ralf Sch?fer wrote:

            
Exactly!!! Why do you think that Brian Ripley and others went to 
considerable trouble to provide it? Currently version 0.6-31 is available 
from CRAN extras for leopard on R 2.12, and rgdal 0.6-27 for leopard on R 
2.11. On Kyngchaos, rgdal 0.6-29 is available for R 2.12, 0.6-28 for R 
2.11. Kyngchaos may provide a wider range of drivers.

Neither of these require the user to install source building support with 
Xcode and other software is if the version of rgdal is not the one 
required, and/or if extra drivers are required. In addition, using CRAN 
extras and update.packages() will update rgdal if and when a newer version 
is produced.

That said, and I sympathise with Barry's observations of apparently 
clueless OSX users - it happens, installing from source is not hard[1], 
and the Kyngchaos Frameworks are probably the most convenient way to 
proceed, as they the "stack" with GRASS or QGIS, ensuring that all the 
OSGeo software in use is the same.
Only if people do not think, really! If Daniel had read and understood 
what was output to his console, he would have know immediately what to do. 
Whether he didn't read it, or didn't understand, is uncertain, but posting 
verbating output saying:

"The gdal-config script distributed with GDAL could not be found.
If you have not installed the GDAL libraries, you can
download the source from  http://www.gdal.org/
If you have installed the GDAL libraries, then make sure that
gdal-config is in your path. Try typing gdal-config at a
shell prompt and see if it runs. If not, use:
--configure-args='--with-gdal-config=/usr/local/bin/gdal-config'
with appropriate values for your installation."

does not suggest reading and understanding.

Before any installation from source, please do run:

gdal-config --version
gdalinfo --version

at a console prompt; if you do not know what a console prompt is, within R 
use:

system("gdal-config --version")
system("gdalinfo --version")

and make sure that the versions reported are the same. If either throws an 
error, such as command not found, then GDAL is not installed correctly, 
and installing rgdal will surely fail.

Note that in the R world, OSX is treated as being close to Unix in user 
skill requirements, certainly more demanding than Windows, which is the 
suggested OS for users who are neither able nor willing to compile 
anything. For lab installs, do use CRAN/CRAN extras for binary contributed 
packages.

Hope this clarifies,

Roger

[1] Hard - that is, how much effort is required of the user in installing 
and using software compared to other tasks the user performs in data 
collection, collation, literature review, handling measurement tools, etc. 
Using a computer for scientific research is not the same as using it as a 
music player or telephone, because the user has to make reasoned choices, 
and should understand the tool well. If not, how on earth will the 
researcher understand the results?