A package that provides simple features access for R. Package sf:
tibbleswith a geometry list-column
POSIXct) columns, and coordinate reference system transformations through PROJ
(Illustration (c) by Allison Horst)
Install either from CRAN with:
this will install binary packages on Windows and MacOS, unless you configured R such that it tries to install source packages; in that case, see below.
Install development versions from github with
The easiest way to install
gdal is using Homebrew. Recent version of homebrew include a full-featured up-to-date gdal formula:
brew install pkg-config brew install gdal
Once gdal is installed, you will be able to install
sf package from source in R.
Alternatively these instructions explain how to install gdal using kyngchaos frameworks.
For Unix-alikes, GDAL (>= 2.0.1), GEOS (>= 3.4.0) and Proj.4 (>= 4.8.0) are required.
Dependencies for recent (non-LTS, later than bionic) versions of Ubuntu are available in the official repositories; install them with
To install the dependencies on LTS versions of Ubuntu (xenial, bionic), either add ubuntugis-unstable to the package repositories and use:
or install dependencies from source; see e.g. an older travis config file for hints.
The following command installs all required dependencies:
Get gdal, proj and geos from the main repos and udunits from the AUR:
pacman -S gdal proj geos pacaur/yaourt/whatever -S udunits
In case you use dynamic linking (installation from source) and have multiple versions of these libraries installed (e.g. one from ubuntugis-unstable, another installed from source in
/usr/local/lib) then this will in general not work, even when setting
LD_LIBRARY_PATH manually. See here for the reason why.
<-; don’t change indentation; tab stops of 4 spaces are preferred)
This project gratefully acknowledges financial support from the