GRASS (Geographic Resources Analysis Support System) is an open source GIS with advanced analysis, modeling, and visualization capabilities.

Development of GRASS started in 1987 by USA-CERL, a branch of the U.S. Army Corps of Engineers, with initial release in 1984 for Unix. In comparison, Esri's initial product ARC/INFO was released in 1982 as a command line GIS product on minicomputers, and later on UNIX (v5.0) and Windows (v7.1). CERL stopped supporting GRASS in 1995 (v4.1) and the current project leader is Markus Neteler. The current major version GRASS 7 was released in 2015.

Database

GRASS manages data output and input under a dedicated directory called GRASS database. As GRASS handles the low-level structure of its database, external data such as Shapefile and GeoTIFF are best maintained in a separate location.

GRASS database hierarchy:

  1. GRASS database: the root directory of GRASS data, typically /home/$USER/grassdata/.
  2. Location: Each Location is defined by a projection, and has a PERMANENT/ mapset for base cartography.
  3. Mapset: a collection of geometric features and attribute data; structure depends on data format and is managed by GRASS.
Figure: GRASS Directory Structure. Source

Modules

GRASS GIS is set up as a modified shell environment where operations are bundled as standalone shell executables called modules. Most modules take maps from the GRASS GIS database and output new maps back. Other types of outputs are stored in temporary files or put to the standard streams which can be chained with other modules. The GRASS distribution includes over 350 core modules, written in C; user-created add-on modules are available on its website.

To launch GRASS shell, export $SHELL as "/bin/bash"; GRASS does not work well with other shells.

See GRASS Reference Manuals (List, Grouped, Graphical) for a complete list of modules.

Figure: GRASS 7 Architecture. Source

General g

General data management:

  • g.proj, projection information.
  • g.region, computational region.
  • g.copy, copy data files to the current mapset.
  • g.mapset, mapset search path.

Vector v

Vector data: attributes/variable associated with geometric features.

Vector data model:

  • Category: Each geographical feature has a unique id/category, which may include multiple not necessarily connected geometries.
  • Layer: A group of geographical feature with one attribute table.
  • Across layers, vector geometries can have zero, one or more categories with which attributes may be associated.

Topological vector digitizer:

  • v.in.ogr
  • v.extract, selects vector objects from an existing vector map and creates a new map.
  • v.proj, re-projection.
  • v.clean, topological cleaning.
  • v.generalize, simplification, smoothing.
  • v.select, feature select operations (calling GEOS).
  • v.overlay, feature overlay operations.
  • v.net, network analysis (shortest path, subnet allocation, cost isoline, travelling salesman).
  • v.rast.stats, univariate statistics per vector feature based on a raster map.
  • v.lrs, Linear referencing (LRS).
  • v.db, attribute table management.
  • v.colors, color table of a vector map.

Raster r & 3D Raster r3

Raster data: observation embedded in a regular geospatial grid.

Raster processing concepts:

  • Raster region: defined by the extent and resolution of a raster map.
  • Computational region: defined by region extent and raster resolution; overrides raster region.
  • Display region: extent of the current map display, independent of computational region and raster region.

Raster processing:

  • r.in.gdal, import raster data of common formats (GeoTIFF).
  • r.univar, univariate analysis.
  • r.mapcalc, map calculation.
  • r.surf, generate surface map.
  • r.grow, grow raster map.
  • r.tile, split a raster map into tiles.
  • DEM (elevation) analysis:
    • cost surface: r.cost, r.walk.
    • hydrological modelling: r.watershed, r.terraflow, r.flow, r.drain, r.fill.
    • sight: r.viewshed.
  • Energy: r.sun, r.sunmask.

Voxel (3D raster) processing:

  • r3.stats, voxel statistics.

Imagery i

  • i.segment, unsupervised image classification.
  • i.pca, Principal Components Analysis on imagery group.

Temporal t

With temporal processing, GRASS GIS can handle spatio-temporal data sets.

Spatial-temporal data processing: (new in GRASS 7)

  • data types: t.rast, t.rast3d, t.vect (time series aggregation).
  • animation

Database db

Database integration: SQLite (default DB backend), PostgreSQL, MySQL, ODBC, DBF.

  • db.connect, database connection.
  • db.select, select value(s) from table.

Display d

Graphic output:

  • d.vect.thematic, displays thematic vector map.

API

GRASS as an open source GIS backbone:

  • C libraries: GRASS GIS 7 Programmer's Manual
  • Python: PyGRASS, GRASS 7 API (scripting via GRASS modules, interface to C libraries); PyWPS, python web processing service (OGC Web Services).
  • R: Using R within GRASS GIS session (Start R or RStudio in a GRASS shell, then load rgrass7); Using GRASS GIS within a R session (call rgrass7::initGRASS()).
  • QGIS: calls GRASS either via Toolbox (direct connection) or Processing (virtual session).
  • ParaView (visualization)

🏷 Category=Geographic Information System