Functions to simplify the linking of open source GIS and remote sensing related command line interfaces.
link2GI provide some functions which make it a bit easier to connect straightforward the common open source GI software packages to the R-biotop. It supports both the use of wrapper packages and the direct API-use via system calls. It focuses on
WindowsX operating systems but nevertheless it should also work with
To utilize the power of the open source GI tools from within
R you need to install them first. As a first promising opportunity to do fullfil most of the requirements you may install
QGIS, GRASS- and
SAGA-GIS following the excellent installation instructions of the RQGIS package will have a good first try to ensure a smooth working environment. Note: for most of the cases you may use just
RQGIS as wrapper for the
QGIS related functionality.
If you have several versions installed or if you want to use the full power of the GI software it will be a nice and helpful tool to deal with some strange behaviours and requirements. Especially helpful is the support of
GDAL-Python functions and a simple support to use any
SAGA version via the CLI. Hopefully
Rsagacmd will join forces in one package in the future. Anyway the brand new release 1.2.0 of
RSAGA as well as the current
Rsagacmd will work with the environment settings as provided by
link2GIis up to CRAN. For the installation of the stable version please use
install.packages("link2GI"). To install the cutting edge version use
devtools::install_github("gisma/link2GI", ref = "master").
GEOSTAT 2018 presentation slides.
link2GI GEOSTAT github repository.
Please check the R dependencies:
install.packages(c("sf", "raster", "rgdal", "gdalUtils", "tools", "rgrass7", "sp", "RSAGA", "link2GI"))# for the Canopy height model usecase you need to install uavRstdevtools::install_github("gisma/uavRst", ref = "master")
In addition you need at least one installation of the following GIS software.
SAGA-GISfollow the RQGIS installation instructions as provided by Jannes Muenchow. For standalone GRASS you may have a look at the the geostat2018 instructions as provided by Veronica Andreos.
Orfeo Toolbox, please follow the OTB cookbook installation instructions.
Please download the data and scripts for the exercises.
If you run the following code you will create the folder link2gi-master in your home folder. During the tutorial it is assumed to be the root folder.
url <- ""res <- curl::curl_download(url, paste0(tmpDir(),"master.zip"))utils::unzip(zipfile = res, exdir = "~")
Basic usage of SAGA and OTB calls - SAGA & OTB basic usecase
Performing a GRASS based cost analysis on a huge cost raster - Beetle spread over high asia
Deriving a canopy height model using a mixed API approach - Canopy Height Model from UAV derived point clouds
The 0.3-0 version is quite restructured to conform to both common R conventions (e.g. no hidden globals) and to make the calls more intuitive and one-line-like. some of the function follow a slightly different naming and argument setting. This was done to keep in line with further CLI linking functionality.