Skip to content
Prev 366620 / 398503 Next

OS X solution... was Re: rgdal functions: spTransform and CRS not working

I get the same error. Using OSX:

Built: R 3.3.2; x86_64-apple-darwin13.4.0; 2016-12-17 14:34:29 UTC; unix

.... with recently updated rgdal but did not update either GDAL or PROJ4

Loaded GDAL runtime: GDAL 2.1.2, released 2016/10/24
 Path to GDAL shared files: 
 Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, 

which I am seeing some documented problems with

... when I search on the warning message:

WARNING: no proj_defs.dat in PROJ.4 shared files

...  I got when loading rgdal:

https://github.com/OSGeo/proj.4/issues/351

So I'm wondering what OS you have and what version of GDAL and PROJ4 you are using. I'm quitting my session so I can update my system structure. I've had success in hte past with the KingChaos disk images:

GDAL 2.1 Complete
http://www.kyngchaos.com/files/software/frameworks/GDAL_Complete-2.1.dmg

Used the disk image from Finder.app

That failed to resolve the warning or the error from rgdal::make_EPSG. Tried (re-)installing rgdal from current source tar.gz file using install.packages. Got an error relating to missing gdal-config

So based on a stackOverflow solution from Fran Villamil: http://stackoverflow.com/questions/34333624/trouble-installing-rgdal/37829420#37829420, I tried (from the R console):

install.packages('rgdal', type = "source", configure.args=c(
'--with-gdal-config=/Library/Frameworks/GDAL.framework/Programs/gdal-config', 
'--with-proj-include=/Library/Frameworks/PROJ.framework/Headers', 
'--with-proj-lib=/Library/Frameworks/PROJ.framework/unix/lib'))


reloaded R and ... no warnings or errors

I'm a somewhat clueless, albeit noisy user of R. I don't really have the development skills to figure out how to construct the code to tie together all these compiled bits, but I do find that searching is often sufficient to solve problems. If this is not an exact match to your situation,  then you should first read the posting guide and include sufficient information about _your_ OS, your system tools,  and versions of external-to-R packages to support a more focussed discussion.

Best;
David.
David Winsemius
Alameda, CA, USA