GRASS (Geographic Resources Analysis Support System) is an open source GIS with advanced raster and vector analytics.

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

Database Structure

GRASS data 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.

External data such as Shapefile or GeoTIFF are best stored in a directory separate from the GRASS data directory.

Figure: GRASS Directory Structure. Source

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 GIS 7 Programmer's Manual

[GRASS does not work well with other shells, and need $SHELL be "/bin/bash".]

GRASS as an open source GIS backbone:

  • 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:
  • Python: PyGRASS, GRASS 7 API ; PyWPS, python web processing service (OGC Web Services).
  • QGIS: calls GRASS either via Toolbox (direct connection) or Processing (virtual session).
  • ParaView (visualization)

🏷 Category=Geographic Information System