Unit 07 - QGIS loves GRASS¶
Let’s step out of the GRASS GIS environment for a moment. QGIS is a very popular open source GIS package which made a significant progress in the last years. Nowadays it’s used in education, academic environment, but also in commercial settings. In 2002 QGIS started a multiplatform viewer for geospatial data. In the recent years QGIS made important steps for being analytical tool. Beside native algoritms QGIS offers also connection to third-party software packages as SAGA, Orfeo or GRASS GIS. GRASS tools can be run directly from QGIS enviroment without starting GRASS explicitly.
Data produced by GRASS GIS may be easily accessed directly from Browser tab.
Note
QGIS has some issues with GRASS raster data symbology. Broken symbology may be fixed in Properties dialog.
It is also possible to run GRASS tools from Processing plugin.
Let’s compute NDVI as described in Unit 05 - Raster processing using i.vi
GRASS tool, but in this case directly from QGIS UI. Load into QGIS
input data: Jena city region (osm/jena_boundary.gpkg
)
and Sentinel bands (red and near-infrared channels) from
sentinel/sample
directory.
Processing plugin¶
Processing plugin is a generic toolbox which allows to run tools provided by QGIS or third-party software packages like eg. GRASS. Let’s open i.vi GRASS module.
and search forFig. 47 shows how Processing plugin works. First of all a temporary GRASS location is created by g.proj, input data is linked into temporary location by r.external. Then computation can finally starts by running i.vi module. In the last step output data is exported out of GRASS using r.out.gdal. The resultant GeoTiff file is vizualized in QGIS map window.