[R-pkg-devel] how to call PROJ.4 C code in a package?

Hadley Wickham h.wickham at gmail.com
Fri May 22 21:03:35 CEST 2015


> Yes, and a CRAN team member already suggested:
>
> "All CRAN build/test systems have proj4 installed (packages rgdal and proj
> need it) and it would have been better to link to libproj as those packages
> do."

If you're unsure how to do that, just look at the source for the proj4
package: https://github.com/cran/proj4/tree/master/src (that link is
via the convenient github mirror)  You'll need to mimic the makevars
files.

If that package doesn't do exactly what you need, you can use github
search to look for other packages that use proj_api.h:
https://github.com/search?q=user%3Acran+proj_api.h&type=Code

Hadley

-- 
http://had.co.nz/



More information about the R-package-devel mailing list