From c7be92dab593dc893524ff992fc0ed5440e03acc Mon Sep 17 00:00:00 2001
From: gisma The spatial analysis itself is often supported by wrapper packages
that integrate external libraries, command line tools or a mixture of
-both in an R-like syntax rgeos, geosphere, Distance, maptools, igraph or spatstat.Link GI to R
Chris
Reudenbach
- 2023-01-27
+ 2023-11-03
Source: vignettes/link2GI1.Rmd
link2GI1.Rmd
Why link2GI now?
A comprehensive introduction to the spatial R-biotope and its -backgrounds is excellently treated in Geocomputation with R wich -is highly recommend as a reference textbook.
+backgrounds is excellently treated in Geocomputation with R wich is highly +recommend as a reference textbook.Despite all this capabilities of spatial analysis and data handling
in the world of R
, it can be stated (at least from a non-R
point of view), that there is still a enormous gap between R and the
diff --git a/docs/articles/link2GI2.html b/docs/articles/link2GI2.html
index c4be33e..df7ba60 100644
--- a/docs/articles/link2GI2.html
+++ b/docs/articles/link2GI2.html
@@ -33,7 +33,7 @@
@@ -97,7 +97,7 @@
vignettes/link2GI2.Rmd
link2GI2.Rmd
If you already did a full search and kow your installation fo example
using the command findGRASS
you can use the result directly
for linking.
findGRASS()
-
- instDir version installation_type1 /opt/grass 7.8.1 grass78
-
-# now linking it
-linkGRASS(nc,c("/opt/grass","7.8.15","grass78"))
-
-# corresponding linkage running windows
-linkGRASS(nc,c("C:/Program Files/GRASS GIS7.0.5","GRASS GIS 7.0.5","NSIS"))
findGRASS()
+ instDir version installation_type
+1 /opt/grass 7.8.1 grass78
+
+# now linking it
+linkGRASS(nc,c("/opt/grass","7.8.15","grass78"))
+
+# corresponding linkage running windows
+linkGRASS(nc,c("C:/Program Files/GRASS GIS7.0.5","GRASS GIS 7.0.5","NSIS"))
require(link2GI)
-require(terra)
+require(terra)
require(listviewer)
otblink<-link2GI::linkOTB()
projRootDir<-tempdir()
-data('rgb', package = 'link2GI')
-terra::plotRGB(rgb)
-r<-terra::writeRaster(rgb,
- filename=file.path(projRootDir,"test.tif"),
- format="GTiff", overwrite=TRUE)
+fn <- system.file("ex/elev.tif", package = "terra")
+
## for the example we use the edge detection,
algoKeyword<- "EdgeExtraction"
@@ -412,7 +409,7 @@ A typical usecase for t
listviewer::jsonedit(cmd$help)
## define the mandantory arguments all other will be default
-cmd$input <- file.path(projRootDir,"test.tif")
+cmd$input <- fn
cmd$filter <- "touzi"
cmd$channel <- 2
cmd$out <- file.path(projRootDir,paste0("out",cmd$filter,".tif"))
diff --git a/docs/articles/link2GI3.html b/docs/articles/link2GI3.html
index e4f31f1..1133abf 100644
--- a/docs/articles/link2GI3.html
+++ b/docs/articles/link2GI3.html
@@ -1,8 +1,24 @@
-linkGRASS real world data usecase • link2GI
+
+
+
+
+
+linkGRASS real world data usecase • link2GI
+
+
+
+
+
+
+
+
+
+
+
@@ -17,12 +33,13 @@
-
vignettes/link2GI3.Rmd
link2GI3.Rmd
A typical example is the usage of an already existing project
database in GRASS
. GRASS
organizes all data in
an internal file structure that is known as gisdbase folder, a mapset
@@ -96,15 +116,17 @@
GRASS
. So a typical task could be to work on data sets that
are already stored in an existing GRASS
structure
-First of all we need some real world data. In this this case the gridded German 2011 micro zensus data. Download the data:
-# (https://www.zensus2011.de/EN/Service/Contact/contact_node.html)
-wget https://www.zensus2011.de/SharedDocs/Downloads/DE/Pressemitteilung/DemografischeGrunddaten/csv_Bevoelkerung_100m_Gitter.zip?__blob=publicationFile&v=3
# (https://www.zensus2011.de/EN/Service/Contact/contact_node.html)
+wget https://www.zensus2011.de/SharedDocs/Downloads/DE/Pressemitteilung/DemografischeGrunddaten/csv_Bevoelkerung_100m_Gitter.zip?__blob=publicationFile&v=3
of Germany. It has some nice aspects:
We also have to download the meta data description file from the above website for informations about projection and data concepts and so on.
-# we need some additional packages
- require(link2GI)
- require(curl)
-
-# first of all we create a project folder structure
-::initProj(projRootDir = paste0(tempdir(),"/link2GI_examples"),
- link2GIprojFolders = c("run/"),
- path_prefix = "path_",
- global = TRUE)
-
-# set runtime directory
-setwd(path_run)
-
-# get some typical authority generated data
-<-"https://www.zensus2011.de/SharedDocs/Downloads/DE/Pressemitteilung/DemografischeGrunddaten/csv_Bevoelkerung_100m_Gitter.zip;jsessionid=294313DDBB57914D6636DE373897A3F2.2_cid389?__blob=publicationFile&v=3"
- url<- curl::curl_download(url, paste0(path_run,"testdata.zip"))
- res
-# unzip it
-unzip(res,files = grep(".csv", unzip(res,list = TRUE)$Name,value = TRUE),
- junkpaths = TRUE, overwrite = TRUE)
- <- list.files(pattern = "[.]csv$", path = getwd(), full.names = TRUE) fn
+ # we need some additional packages
+ require(link2GI)
+ require(curl)
+
+# first of all we create a project folder structure
+ link2GI::initProj(projRootDir = paste0(tempdir(),"/link2GI_examples"),
+ projFolders = c("run/"),
+ path_prefix = "path_",
+ global = TRUE)
+
+# set runtime directory
+ setwd(path_run)
+
+# get some typical authority generated data
+ url<-"https://www.zensus2011.de/SharedDocs/Downloads/DE/Pressemitteilung/DemografischeGrunddaten/csv_Bevoelkerung_100m_Gitter.zip;jsessionid=294313DDBB57914D6636DE373897A3F2.2_cid389?__blob=publicationFile&v=3"
+ res <- curl::curl_download(url, paste0(path_run,"testdata.zip"))
+
+# unzip it
+ unzip(res,files = grep(".csv", unzip(res,list = TRUE)$Name,value = TRUE),
+ junkpaths = TRUE, overwrite = TRUE)
+fn <- list.files(pattern = "[.]csv$", path = getwd(), full.names = TRUE)
After downloading the data we will use it for some demonstration stuff. If you have a look the data is nothing than x,y,z with assuming some projection information.
-# fast read with data.table
-<- data.table::fread(paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.csv"))
- xyz
-head(xyz)
+# fast read with data.table
+ xyz <- data.table::fread(paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.csv"))
+
+ head(xyz)
We can easy rasterize this data as it is intentionally gridded data.that means we have in at a grid size of 100 by 100 meters a value.
-require(RColorBrewer)
- require(terra)
- require(mapview)
-
-
-# clean dataframe
-<- xyz[,-1]
- xyz
-# rasterize it according to the projection
-<- terra::rast(xyz, type="xyz")
- r ::crs(r) <- 3035
- terra
-# map it
-<- colorRampPalette(brewer.pal(8, "Reds"))
- p # aet resolution to 1 sqkm
- ::mapviewOptions(mapview.maxpixels = r@ncols*r@nrows/10)
- mapview::mapview(r, col.regions = p,
- mapviewat = c(-1,10,25,50,100,500,1000,2500),
- legend = TRUE)
+ require(RColorBrewer)
+ require(terra)
+ require(mapview)
+
+
+# clean dataframe
+ xyz <- xyz[,-1]
+
+# rasterize it according to the projection
+ r <- terra::rast(xyz, type="xyz")
+ terra::crs(r) <- 3035
+
+# map it
+ p <- colorRampPalette(brewer.pal(8, "Reds"))
+ # aet resolution to 1 sqkm
+ mapview::mapviewOptions(mapview.maxpixels = r@ncols*r@nrows/10)
+ mapview::mapview(r, col.regions = p,
+ at = c(-1,10,25,50,100,500,1000,2500),
+ legend = TRUE)
So far nothing new. Now we create a new but permanent
GRASS
gisbase using the spatial parameters from the raster
object. As you know the linkGRASS
function performs a full
@@ -178,60 +205,63 @@
Due to the fact that the gisdbase_exist
is by default
set to FALSE it will create a new structure according to the
R
object.
require(link2GI)
-# initialize GRASS and set up a permanent structure
-::linkGRASS(x = r,
- link2GIgisdbase = paste0(tempdir(),"/link2GI_examples"),
- location = "microzensus2011")
+require(link2GI)
+# initialize GRASS and set up a permanent structure
+link2GI::linkGRASS(x = r,
+ gisdbase = paste0(tempdir(),"/link2GI_examples"),
+ location = "microzensus2011")
Finally we can now import the data to the GRASS
gisdbase
using the rgass
package functionality.
First we must convert the raster/terra object to a
GeoTIFF
file. Any GDAL
format is possible but
GeoTIFF
is very common and stable.
require(link2GI)
-require(raster)
-require(rgrass)
-
-# write it to geotiff
-::writeRaster(r, paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.tif"),
- terraoverwrite = TRUE)
- x
-# import raster to GRASS
-::execGRASS('r.external',
- rgrassflags=c('o',"overwrite","quiet"),
- input=paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.tif"),
- output="Zensus_Bevoelkerung_100m_Gitter",
- band=1)
-
-# check imported data set
-::execGRASS('r.info',
- rgrassmap = "Zensus_Bevoelkerung_100m_Gitter")
require(link2GI)
+require(raster)
+require(rgrass)
+
+# write it to geotiff
+ terra::writeRaster(r, paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.tif"),
+ x overwrite = TRUE)
+
+# import raster to GRASS
+rgrass::execGRASS('r.external',
+ flags=c('o',"overwrite","quiet"),
+ input=paste0(path_run,"/Zensus_Bevoelkerung_100m-Gitter.tif"),
+ output="Zensus_Bevoelkerung_100m_Gitter",
+ band=1)
+
+# check imported data set
+rgrass::execGRASS('r.info',
+ map = "Zensus_Bevoelkerung_100m_Gitter")
Let’s do now the same import as a vector data set. First we create a
sf
object. Please note this will take quite a while.
= st_as_sf(xyz,
- xyz_sf coords = c("x_mp_100m", "y_mp_100m"),
- crs = 3035,
- agr = "constant")
-
-#map points
-::plot_sf(xyz_sf) sf
+ xyz_sf = st_as_sf(xyz,
+ coords = c("x_mp_100m", "y_mp_100m"),
+ crs = 3035,
+ agr = "constant")
+
+#map points
+ sf::plot_sf(xyz_sf)
The GRASS
gisdbase already exists. So we pass
linkGRASS
the argument gisdbase_exist=TRUE
and
import the xyz data as generic GRASS vector points.
require(sf)
- require(sp)
- require(link2GI)
-
- sf2gvec(x = xyz_sf,
- obj_name = "Zensus_Bevoelkerung_100m_",
- gisdbase = paste0(tempdir(),"/link2GI_examples"),
- location = "microzensus2011",
- gisdbase_exist = TRUE
-
-
- )
- # check imported data set
-::execGRASS('v.info', map = "Zensus_Bevoelkerung_100m_") rgrass
+ require(sf)
+ require(sp)
+ require(link2GI)
+
+ sf2gvec(x = xyz_sf,
+ obj_name = "Zensus_Bevoelkerung_100m_",
+ gisdbase = paste0(tempdir(),"/link2GI_examples"),
+ location = "microzensus2011",
+ gisdbase_exist = TRUE
+
+ )
+
+# check imported data set
+rgrass::execGRASS('v.info', map = "Zensus_Bevoelkerung_100m_")
vignettes/link2GI4.Rmd
link2GI4.Rmd
vignettes/link2GI5.Rmd
link2GI5.Rmd
vignettes/link2GI6.Rmd
link2GI6.Rmd
If you additionally want to use the LiDAR processing -tools (LAStools), please follow the steps found here.
+tools (LAStools), please follow the steps found here.sudo apt-get --purge remove qgis
-sudo apt autoremove --purge-remove
-sudo apt autoremove
-sudo apt-get update
Next add the correct repository to
/etc/apt/sources.list
. Here, we use the current long-term
release (3.10):
QGIS 3.10.x for Ubuntu 20.04
-# install necessary tools
-sudo apt install gnupg software-properties-common
-
-#add the required keys
-wget -qO - https://qgis.org/downloads/qgis-2020.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
-
-# verify the key
-gpg --fingerprint 51F523511C7028C3
-
-# add the repository
-# if there are problems
-sudo add-apt-repository "deb https://qgis.org/debian lsb_release -c -s main"
-
-# if there are problems use the hard-wired "focal" release
-sudo add-apt-repository "deb https://qgis.org/debian focal main"
-
# install necessary tools
+sudo apt install gnupg software-properties-common
+
+#add the required keys
+wget -qO - https://qgis.org/downloads/qgis-2020.gpg.key | sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/qgis-archive.gpg --import
+
+# verify the key
+gpg --fingerprint 51F523511C7028C3
+
+# add the repository
+# if there are problems
+sudo add-apt-repository "deb https://qgis.org/debian lsb_release -c -s main"
+
+# if there are problems use the hard-wired "focal" release
+sudo add-apt-repository "deb https://qgis.org/debian focal main"
+
After that, we can install QGIS and GRASS saga and Orfeo Toolbox as follows:
-# install qgis grass otb saga
-
-sudo apt update
-sudo apt install qgis python-qgis qgis-plugin-grass grass saga otb-bin
# install qgis grass otb saga
+
+sudo apt update
+sudo apt install qgis python-qgis qgis-plugin-grass grass saga otb-bin
If you would like to use another SAGA version, you need to compile it yourself (see here). Please note, however, that QGIS currently only supports the SAGA LTR @@ -264,7 +264,7 @@
You can install current stable QGIS, SAGA and GRASS GIS versions via the standard software package manager:
-sudo dnf install qgis-python qgis qgis-grass saga grass-gui grass-libs
There is no binary install of SAGA for macOS. We recommend to use the
bottle installation from homebrew
:
# brew tap osgeo4mac
-brew install saga-gis-lts
-brew link saga-gis-lts --force
If you do not link SAGA with force, QGIS will not be able to detect SAGA.
Alternatively, you can compile SAGA from source from the SAGA
@@ -288,8 +288,8 @@ You can install GRASS6 and GRASS7 via The binary GRASS installation can be found here. However, we
recommend to use the When installing GRASS7 independently of QGIS via
diff --git a/docs/authors.html b/docs/authors.html
index b2c9422..7167c97 100644
--- a/docs/authors.html
+++ b/docs/authors.html
@@ -17,7 +17,7 @@
SAGA
GRASS
homebrew
:# brew tap osgeo4mac
-brew install grass6 grass7
homebrew
approach.
Package website: release
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
.
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
.
new feature: * add return of vector data in OTB calls
bugfixes: * issue #58 * minor fixes in runOTB
bugfixes: * prelim fix of issue #57 * fix of issue #56 * minor fixes
new feature: * integration of stars and terra raster objects for linking GRASS * update of documentation
+bugfixes: * prelim fix of issue #57 * fix of issue #56 * minor fixes
+new feature: * integration of stars and terra raster objects for linking GRASS * update of documentation
initProj()
Defines and creates folders and variables
Bridges to the GI-World
parseOTBFunction()
Get OTB function argument list
RGB ortho-image from an arbitrary Marburg Open Forest (MOF) plot
if (FALSE) {
require(link2GI)
-require(terra)
+require(terra)
require(listviewer)
## link to OTB
@@ -126,11 +126,7 @@ Examples
if (otblink$exist) {
projRootDir<-tempdir()
- data('rgb', package = 'link2GI')
- terra::plotRGB(rgb)
- r<-terra::writeRaster(rgb,
- filename=file.path(projRootDir,"test.tif"),
- overwrite=TRUE)
+ fn <- system.file("ex/elev.tif", package = "terra")
## for an image output example we use the Statistic Extraction,
algoKeyword<- "LocalStatisticExtraction"
@@ -143,7 +139,7 @@ Examples
listviewer::jsonedit(cmd$help)
## define the mandatory arguments all other will be default
-cmd$input_in <- file.path(tempdir(),"test.tif")
+cmd$input_in <- fn
cmd$out <- file.path(tempdir(),"test_otb_stat.tif")
cmd$radius <- 7
diff --git a/docs/reference/searchGDALW.html b/docs/reference/searchGDALW.html
index 67f79c4..45ab1ac 100644
--- a/docs/reference/searchGDALW.html
+++ b/docs/reference/searchGDALW.html
@@ -17,7 +17,7 @@
The link2GI package provides a small linking tool to simplify the usage of GRASS GIS
, SAGA GIS
, Orfeo Toolbox
(OTB
) and GDAL
binaries for R users. the focus is to simplify the the accessibility of this software for non operating system specialists or highly experienced GIS geeks. Acutally it is a direct result of numerous graduate courses with R(-GIS) beginners in the hostile world of university computer pools running under extremely restricted Windows systems.
This vignette:
R has quite a lot of classes for storing and dealing with spatial data. For vector data in the past the sp and at present the great sf packages are well known and the raster data world is widely covered by the raster and currently the terra package. For more specific links as needed for manipulating atmospheric modeling packages as ncdf4 are very helpful.
-The spatial analysis itself is often supported by wrapper packages that integrate external libraries, command line tools or a mixture of both in an R-like syntax rgeos, geosphere, Distance, maptools, igraph or spatstat.
-A comprehensive introduction to the spatial R-biotope and its backgrounds is excellently treated in Geocomputation with R wich is highly recommend as a reference textbook.
+The spatial analysis itself is often supported by wrapper packages that integrate external libraries, command line tools or a mixture of both in an R-like syntax geosphere, Distance, igraph or spatstat.
+A comprehensive introduction to the spatial R-biotope and its backgrounds is excellently treated in Geocomputation with R wich is highly recommend as a reference textbook.
Despite all this capabilities of spatial analysis and data handling in the world of R
, it can be stated (at least from a non-R point of view), that there is still a enormous gap between R and the mature open source Geographic Information System (GIS) and even more Remote Sensing (RS) software community. QGIS
, GRASS GIS
and SAGA GIS
are providing a comprehensive, growing and mature collection of highly sophisticated algorithms. The provided algorithms are fast, stable and most of them are well proofed. Probably most of the R
users who are somehow related to the GI community know that there are awesome good wrapper packages for bridging this gap. For GRASS GIS ⅞ it is rgrass and for SAGA GIS the RSAGA package.
In addition there is no wrapper for the great OTB
. It seems to be at least convenient to provide a lightweight wrapping utility for the usage of OTB
modules from R
.
Unfortunately one will run into a lot of technical problems depending on the choosen operating system (OS) or library dependencies or GIS software versions. In case of e.g. RSAGA
the main problem has been that the SAGA
GIS developers are not only changing the syntax and strategy of the command line interface (CLI) but also within the same release the calls differ from OS to OS. So the maintenance of RSAGA is at least laborious (but thumbs up is running again). Another example is given by GRASS GIS
which is well known for a sophisticated setup of the environment and the spatial properties of the database. If you “just” want to use a specific GRASS
algorithm from R, you will probablys get lost in setting up all OS-dependencies that are neccessary to set up a correct temporary or permanent GRASS
-environment from “outside”. This is not only caused due to the strict spatial and projection requirements of GRASS
but much more by challenging OS enviroments especially Windows.
To make it short it is a bit cumbersome to deal with all this stuff if one just want to start e.g. GRASS
from the R command line for e.g. a powerful random walk cost analysis (r.walk
) call as provided by GRASS
.
Linking means simply to provide all necessary environment settings that satisfy the existing wrapper packages as well as in addition the full access to the the command line (CLI) APIs of the mentioned software tools. link2GI
tries to analyze which software is installed to set up an temporary enviroment meeting the above mentioned needs.
GRASS GIS
has the most challenging requirements. It needs a bunch of environment and path variables as and a correct setup of the geographical data parameters. The linkGRASS
function tries to find all installations let you (optionally) choose the one you want to use and generate the necessary variables. As a result you can use both the rgrass
package or the command line API
of GRASS
.
SAGA GIS
is a far easier to set up. Again the linkSAGA
function tries to find all SAGA
installations, let you (optionally) choose one and generate the necessary variables. You may also use RSAGA
but you have to hand over the result of linkSAGA
like RSAGA::rsaga.env(path = saga$sagaPath)
. For a straightforward usage you may simply use the R
system() call to interface R
with the saga_cmd
API.
The Orfeo Toolbox
(OTB) is a very powerful remote sensing toolbox. It is widely used for classification, filtering and machine learning applications. You will find some of the implemented algorithm within different R packages but always much slower or only running on small data chunks. link2GI
searches and connects all OTB
installations of a given search path and provides the result as a clear list. Due to a missing wrapper package, a list-based OTB
module and function parser is also available, which can be piped into the function runOTB
for a convenient function call.
Notwithstanding that GDAL
is perfectly integrated in R in some cases it is beneficial to use system calls and grab the binaries directly. In particular the evolution to GDAL 3.x
and optionally various boxed versions of GDAL
binaries working together with different Python
and proj4/proj6
libs makes it sometimes difficult to grab the correct version of GDAL
. link2GI
generates a list of all pathes and commands of all GDAL
installation in the provided search path. With this list, you can easily use all available API calls of each installation.
Automatic search and find of the installed GIS software binaries is performed by the find
functions. Depending of you OS and the number of installed versions you will get a dataframe providing the binary and module folders.
So the most straightforward call to link temporary to GRASS GIS
woud be:
# find all SAGA GIS installations at the default search location
@@ -118,9 +183,10 @@ Brute force search usage
grass <- link2GI::linkGRASS()
grass
-
-
-
+The vignette is a slightly adapted version of the installation guide of the archived RQGIS package. Big thanks to Patrick Schratz and Jannis Muenchow.
- -This vignette guides you through the installation process of QGIS, GRASS- and SAGA-GIS as well as Orfeo Toolbox and GDAL on three different platforms (Windows, Mac, Linux). -Following the instructions should ensure that link2GI will work properly. +
This vignette guides you through the installation process of QGIS, GRASS- and SAGA-GIS as well as Orfeo Toolbox and GDAL on three different platforms (Windows, Mac, Linux). +Following the instructions should ensure that link2GI will work properly. With the exception of SAGA (SAGA is pretty idiosyncratic in questions of interface conformity), we recommend to use the latest stable version of all software packages.
-Overall, link2GI allows access to more than some thousands of reliable and well known geo-algorithms. However, please note that the number of geo-algorithms you can use linking with link2GI depends on the platform, the system architecture, the selection of installed third-party providers and software package versions.
- -There are at least two options to install QGIS on Windows. The first option is the Standalone Installer from the QGIS installer page. -This will install QGIS along with the third-party providers GRASS and SAGA. -However, if you would like to use even more third-party providers (e.g., GDAL, GEOS, Taudem, OTB, PostGIS, etc.), it is strongly recommended to use the OSGeo4W Network installer. -This installer is available on the QGIS installer page as well as on the OSGeo4W-website.
- +There are at least two options to install QGIS on Windows. The first option is the Standalone Installer from the QGIS installer page. +This will install QGIS along with the third-party providers GRASS and SAGA. +However, if you would like to use even more third-party providers (e.g., GDAL, GEOS, Taudem, OTB, PostGIS, etc.), it is strongly recommended to use the OSGeo4W Network installer. +This installer is available on the QGIS installer page as well as on the OSGeo4W-website.
NOTE: Do not install QGIS 2.x
-To install OSGeo4W, the easiest way is to to use the Express installation:
- - - +Sorry for the German dialogues. Nevertheless, it should be easy enough to follow our steps.
-This installation is more or less equivalent to the standalone QGIS-installation. However, to have the full choice of available geoalgorithms provided by QGIS, we recommend to use the advanced settings of the OSGeo4W Network installer:
-Additionally, we choose the Desktop-GIS GRASS, the Orfeo Toolbox, SAGA, and QGIS (even if not directly supported by link2GI right now). Here, we install both the most recent QGIS 3.x version as well as the long-term release.
- -Additionally, we choose the Desktop-GIS GRASS, the Orfeo Toolbox, SAGA, and QGIS (even if not directly supported by link2GI right now). Here, we install both the most recent QGIS 3.x version as well as the long-term release.
+Clicking “Next” once more will start the download and installation process which might take a while.
- -If you wish to to modify, uninstall or update some of the installed components, you might do so later on by running ../OSGeo4W/bin/osgeo4w-setup.exe
.
+
Clicking “Next” once more will start the download and installation process which might take a while.
+If you wish to to modify, uninstall or update some of the installed components, you might do so later on by running ../OSGeo4W/bin/osgeo4w-setup.exe
.
Alternatively, you can download and run again the latest OSGeo4W-executable.
If you additionally want to use the LiDAR processing tools (LAStools), please follow the steps found here.
- -If you additionally want to use the LiDAR processing tools (LAStools), please follow the steps found here.
+Please download the current (at this point OTB-7.2.0-Win64) or appropriate version of the Orfeo Toolbox software. Then follow the advice of the OTB team:
- -“We provide standalone binaries for Windows which do not require administrative privileges. Download the archive below (32 or 64 bits), and extract it somewhere. Double-click on the monteverdi.bat to launch Monteverdi, or mapla.bat for the OTB application browser. Please see the CookBook for detailed installation instructions.”
- -If you install QGIS with the built-in software managers, you will most likely get an outdated QGIS version. -To install more recent QGIS releases, we recommend to follow the installation instructions from the QGIS installers website.
- +“We provide standalone binaries for Windows which do not require administrative privileges. Download the archive below (32 or 64 bits), and extract it somewhere. Double-click on the monteverdi.bat to launch Monteverdi, or mapla.bat for the OTB application browser. Please see the CookBook for detailed installation instructions.”
+If you install QGIS with the built-in software managers, you will most likely get an outdated QGIS version. +To install more recent QGIS releases, we recommend to follow the installation instructions from the QGIS installers website.
Here, we just describe exemplarily the QGIS installation procedure under Debian/Ubuntu following the description found here. link2GI should work as well with Linux derivatives other than Ubuntu. However, just Ubuntu , Debian and Manjaro are tested.
-Open a terminal window. First of all, make sure to remove QGIS and GRASS packages you may have installed before from other repositories:
- - -sudo apt-get --purge remove qgis
+sudo apt-get --purge remove qgis
sudo apt autoremove --purge-remove
sudo apt autoremove
sudo apt-get update
-
Next add the correct repository to /etc/apt/sources.list
.
Here, we use the current long-term release (3.10):
-
QGIS 3.10.x for Ubuntu 20.04
-
-# install necessary tools
+# install necessary tools
sudo apt install gnupg software-properties-common
#add the required keys
@@ -281,79 +228,57 @@ Ubuntu
-
After that, we can install QGIS and GRASS saga and Orfeo Toolbox as follows:
-
-# install qgis grass otb saga
+# install qgis grass otb saga
sudo apt update
sudo apt install qgis python-qgis qgis-plugin-grass grass saga otb-bin
-
-If you would like to use another SAGA version, you need to compile it yourself (see here).
+
If you would like to use another SAGA version, you need to compile it yourself (see here).
Please note, however, that QGIS currently only supports the SAGA LTR 2.3.x as far as we know.
-
-Arch Linux
-
-You can install various QGIS, SAGA and GRASS versions from the Arch User Repository.
-
-Fedora
-
+Arch Linux
+You can install various QGIS, SAGA and GRASS versions from the Arch User Repository.
+Fedora
You can install current stable QGIS, SAGA and GRASS GIS versions via the standard software package manager:
-
-sudo dnf install qgis-python qgis qgis-grass saga grass-gui grass-libs
+sudo dnf install qgis-python qgis qgis-grass saga grass-gui grass-libs
-
-Mac OSX
-
-SAGA
-
+Mac OSX
+SAGA
There is no binary install of SAGA for macOS.
We recommend to use the bottle installation from homebrew
:
-
-# brew tap osgeo4mac
+# brew tap osgeo4mac
brew install saga-gis-lts
brew link saga-gis-lts --force
-
If you do not link SAGA with force, QGIS will not be able to detect SAGA.
-
-Alternatively, you can compile SAGA from source from the SAGA website.
+
Alternatively, you can compile SAGA from source from the SAGA website.
However, this is tedious and QGIS2 only supports the SAGA LTS version.
-
-GRASS
-
+GRASS
You can install GRASS6 and GRASS7 via homebrew
:
-
-# brew tap osgeo4mac
+# brew tap osgeo4mac
brew install grass6 grass7
-
-The binary GRASS installation can be found here.
+
The binary GRASS installation can be found here.
However, we recommend to use the homebrew
approach.
-
When installing GRASS7 independently of QGIS via homebrew
, please make sure to install it before you have installed QGIS.
Only this way, the path for the QGIS processing plugin will be updated.
Otherwise, the GRASS installation will work, however, GRASS7Utils.grassPath()
, a QGIS function that links to the GRASS installation, gives back a non-existing path such as /Applications/Grass-7.0.app/Contents/MacOS
which in turn prevents GRASS algorithms from working from within QGIS.
-
-QGIS
-
+QGIS
Two options exist installing QGIS on macOS
-
- Using
homebrew
(recommended)
-
# brew tap osgeo4mac
brew install qgis3
-
-Check brew info qgis3
for more available options.
+
Check brew info qgis3
for more available options.
However, if you use them, QGIS will be compiled from source which may take > 30 min (depending on your system).
Otherwise, pre-built bottles (= binaries) will be used which speeds up the installation process a lot.
-
Note: Make sure to install SAGA and GRASS before QGIS so that QGIS finds the correct paths.
-
+