Linking Geographic Information Systems, Remote Sensing and Other Command Line Tools

Functions to simplify the linking of open source GIS and remote sensing related command line interfaces.

Project Status: Active – The project has reached a stable, usable state and is being actively developed. Travis-CI Build Status CRAN version GitHub last commit License

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 Linux and WindowsX operating systems but nevertheless it should also work with OSX.

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 OTB, the GDAL-Python functions and a simple support to use any SAGA version via the CLI. Hopefully RSAGA and 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 linkSAGA.


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").

Usecases presented on the GEOSTAT August 2018

During the GEOSTAT 2018 in Prague some more complex usescases has been presented.

Find slides and materials

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 uavRst
devtools::install_github("gisma/uavRst", ref = "master")

In addition you need at least one installation of the following GIS software.

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(),""))
utils::unzip(zipfile = res, exdir = "~")

The examples


link2GI 0.3-5

new feature:

  • add manual build function for UNC pathes bugfixes:
  • remove search argument for PRZP
  • several fixes for Windows search and linking
  • Comments and typos

link2GI 0.3-4

new feature:

  • add boolean variable if required API exists


  • fix of the quiet option
  • fix the search order
  • straighten GRASS problems with
  • several fixes for Windows search and linking
  • fix and add a lot of examples
  • Comments and typos

link2GI 0.3-3

new feature:

  • by default the latest version of each API is selected


  • OTB basic wrapper fixed for Windows
  • new examples
  • Typos

link2GI 0.3-2

new feature:

  • ver_select can be used directly with the number of selection
  • OTB basic wrapper bugfixes:
  • RSAGA related fixes
  • Typos

link2GI 0.3-1

new feature:

  • add returnPaths argument for suppress all returns bugfixes:
  • windows RSAGA related fixes

link2GI 0.3-0

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.

new feature:

  • Linux support for multi-version selection
  • remove all global variables (re-opened issue #3)
  • homogenization of the link calls
  • wrap searchAPIOS functions with OS-agnostic findAPI functions
  • add a more robust return of all pathes and environmental variables as lists
  • add a quiet option to supress all! console outputs (issue #4)


  • remove tailing backslashes
  • force compatibility to RSAGA and SAGA ver 3+

link2GI 0.2-2

new feature:

  • findGRASS a function that wraps for searchGRASSW and searchGRASSX

link2GI 0.2-1


  • fix github issues #2 #3 #5

link2GI 0.2-0


  • fix several small bugs

link2GI 0.1-0

  • Initial release

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.4-7 by Chris Reudenbach, 5 months ago,

Report a bug at

Browse source code at

Authors: Chris Reudenbach [cre, aut] , Tim Appelhans [ctb]

Documentation:   PDF Manual  

GPL (>= 3) | file LICENSE license

Imports devtools, R.utils, roxygen2, sf, stringr, raster, methods, utils

Suggests knitr, rmarkdown, rgdal, sp, RSAGA, rgrass7, curl, listviewer, markdown

System requirements: GNU make

Imported by uavRmp.

See at CRAN