Tips and Tricks for GRASS GIS 8.2

Vaclav (Vashek) Petras

NCSU GeoForAll Lab at the Center for Geospatial Analytics
NC State University

NCGIS, March 8-10, 2023

Vaclav (Vashek) Petras

  • Geospatial Research Software Engineer at NC State's Center for Geospatial Analytics
  • BS & MS in Geoinformatics, Czech Technical University in Prague, Czechia, PhD in Geospatial Analytics, NC State
  • GRASS GIS: Development Team, Project Steering Committee
  • OSGeo: Charter Member

Pick Your Version of GRASS GIS

  • 7.8.8 Legacy, Spring 2023 Maintained legacy version
  • 8.2.1 Current, January 2023 Current version
  • 8.3.0 Preview, Daily Latest reviewed functional code

major.minor.micro – micro (x.y.z) brings fixes, minor (x.y) brings features, major (x) brings features and possibly backward incompatible changes

Explore Both Core and Addons Tools

Use Data Management Panel

… and explore other panels.

Switch to Single-Window Interface in 8.2

Settings > Preferences > General > Use single-window mode

Forget the Startup Screen

Follow Startup Tips

Initial project sets up automatically, but read the provided suggestions for next steps.

Use Mapsets to Organize Data

Use mapsets as subprojects to group related data.

  • Only data in the current mapset can be modified.
  • Data from other mapsets are accessible for reading.

Use Python to Automate Workflows

Automate both processing and visualization

Use Jupyter Notebooks

  • Mix text, code, results & images.
  • Use for prototyping, reproducibility, or tutorials.
  • See grass.jupyter for easy integration.

Generate Quick Web Maps

Use grass.jupyter to quickly generate interactive web maps.

Automate 3D Visualizations in Python

Use grass.jupyter.Map3D to generate 3D visualizations.

Check out the Command Line Interface

Underlying command is available at the bottom of the dialog.

Use Smaller Region Extent for Tests

  • Use smaller extent for computation region when testing.
  • Switch to the full extent when you tested your workflow.
  • Keep the resolution the same.

Align Your Grids

  • Align computation region grid to:
    • raster with Adjust cells to clearly align with...
    • multiples of given resolution value with Align to resolution

Attach Semantic Labels to Rasters

  • image classification can use sematic labels to identify bands
    • different scenes can then be classified if semantic labels are the same
  • organize bands within one spatio-temporal dataset
    • each band can be referred to separately
  • example labels: red, blue, S2_1

See the Tool's Performance Parameters

  • nprocs specifies number of cores (processes, threads).
  • memory specifies RAM in MB.
  • You can always run more multiple tools in the background.

Read the Performance Documentation

The Performance section in tool's documentation describes its

  • memory consumption
  • parallel efficiency
  • disk usage

in relation to different combinations of parameters.

Link Data Instead of Importing

  • r.external can link (open) external raster data faster.
    • almost no time if min & max in metadata or not needed later
  • v.external can link (open) external raster data faster.
    • directly connects to PostGIS and understands its topology
  • Great for workflows when only portion of the data is processed in GRASS GIS.

Don't Limit Yourself to Desktop

  • small VM, Raspberry Pi, old laptop
  • Docker
  • HPC Clusters
  • actinia
  • OpenPlains

Check for Dataset-Specific Imports

GDAL can do a lot just by itself, but i.sentinel, i.modis, i.landsat,,, m.crawl.thredds, t.rast.import.netcdf, … make things much more convenient.

Get Support When Needed


Get Things Done (Individuals)

  • Time: organize a [virtual] community event, check grammar
  • Money:
    • Single-Window Interface, Visualizations for Notebooks

Get Things Done (Organizations)

  • Time: employee time
  • Money: pay developers/companies
    • Provider-independent, contractor-independent
      • If you don't like us, you can hire someone completely independent.
    • Financial investments go to a public pool

Lifetime license for current users in the audience and for everyone who asks a question.*, @vaclavpetras, @wenzeslaus

*The GNU General Public License version 2.0 or higher terms and conditions apply.