SpaDES development version requires package sf

13 views
Skip to first unread message

Steve Cumming

unread,
Mar 12, 2018, 6:02:14 PM3/12/18
to SpaDES Users
which on ubuntu sends is down a rabbit whole to install GDAL 2.0+ from source. We can't have that. 
Jean suggests asking if you can possibly make the "requires sf" a suggest, so that people not needing sf can proceed?


Alex Chubaty

unread,
Mar 12, 2018, 10:52:00 PM3/12/18
to SpaDES Users
You can have that on Ubuntu:

# Ubuntu 16.04
sudo add
-apt-repository ppa:ubuntugis/ubuntugis-unstable
sudo apt
-get update

sudo apt
-get install gdal-bin libgdal-dev libgeos-dev libproj-dev libudunits2-dev


Also for macOS (via brew):

brew tap osgeo/osgeos4mac
brew install gdal2-python
brew link --force gdal2-python

then in R:

install.packages(c("rgeos", "sp"), type = "source")
install
.packages("rgdal", type = "source", configure.args = c(
"--with-proj-include=/usr/local/include", "--with-proj-lib=/usr/local/lib"))
install.packages("sf", type = "source")

Alex

Alex Chubaty

unread,
Mar 12, 2018, 10:54:33 PM3/12/18
to SpaDES Users
you can also use *binary* builds of R packages for Ubuntu by adding the c2d4u repository:

sudo add-apt-repository ppa:marutter/c2d4u
sudo apt
-get update

then install R packages using apt thus:

sudo apt install r-cran-pkgname

Alex

Eliot McIntire

unread,
Mar 12, 2018, 10:54:37 PM3/12/18
to SpaDES Users
...which is from here: https://github.com/r-spatial/sf 

Eliot McIntire

unread,
Mar 13, 2018, 2:33:25 AM3/13/18
to SpaDES Users
I have pushed SpaDES.core to development, so that sf is in Suggests. Essentially, if you aren't using sf objects, then you won't need any of the sf functionality that is in SpaDES.core. Was committed here: https://github.com/PredictiveEcology/SpaDES.core/commit/8a08344941b3c2da3aee848ea839e28f06c470ce 
Reply all
Reply to author
Forward
0 new messages