Hopefully someone can help me figure this issue out. I am trying to system call gdal functions inside of R using the system / system2 functions. Here is an example of the code:
> system("gdalinfo --version") sh: gdalinfo: command not found > system2("gdalinfo --version") sh: gdalinfo --version: command not found
As you can see system cannot call the gdal functions. Anyone know how to fix this?
Inside of the Mac terminal, I can call any of the gdal command line functions:
user-MacBook-Pro:~ user$ gdalinfo --version GDAL 1.10.1, released 2013/08/26
Here is a
Sys.info -- I am running Yosemite on Mac 10.10.1:
Sys.info() # sysname "Darwin" # release "14.0.0" # version "Darwin Kernel Version 14.0.0: Fri Sep 19 00:26:44 PDT 2014; root:xnu-2782.1.97~2/RELEASE_X86_64" # nodename "user-MacBook-Pro.local" # machine "x86_64" # login "user" # user "user" # effective_user "user"
Also see the difference between these two calls. First in R:
system("echo $PATH") /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
And now in terminal, where GDAL is explicitly mentioned:
user-Pro:~ user$ echo $PATH /Library/Frameworks/GDAL.framework/Programs:/Library/Frameworks/GDAL.framework/Programs:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin