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
.
link2GI
is 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("r-spatial/link2GI", ref = "master")
.
During the GEOSTAT 2018 in Prague some more complex usescases has been presented.
GEOSTAT 2018 presentation slides.
link2GI GEOSTAT github repository.
Please check the R dependencies:
install.packages(c("sf", "raster", "rgdal", "tools", "rgrass7", "sp", "RSAGA", "link2GI"))
# for the Canopy height model usecase you need to install uavRst
devtools::install_github("r-spatial/uavRst", ref = "master")
In addition you need at least one installation of the following GIS software.
- For
GRASS
- andSAGA-GIS
follow 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. - For installing the
Orfeo Toolbox
, please follow the OTB cookbook installation instructions.
Please download the data and scripts for the exercises.
PLEASE NOTE:
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 <- "https://github.com/gisma/link2gi2018/archive/master.zip"
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
-
Wrapping a GRASS GIS example of Marcus Neteler as presented on GEOSTAT 2018 - Analysing the ECA&D climatic data - reloaded
-
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