Introducing QNSPECT — An open-source QGIS plugin to estimate nonpoint source pollution and erosion over a watershed

Abdul Raheem Siddiqui
4 min readDec 26, 2022

--

Nonpoint sources generate pollutants and sediments over a dispersed area that are carried to waterbodies through rainfall runoff. © THREE LAKES ASSOCIATION

Background

Nonpoint source pollution and erosion in watersheds have been a source of concern for water quality of streams, agricultural soil management, land development, and coastal pollution among various other things. Analyzing the quantity of nonpoint source pollutants and eroding sediments from an area of interest is a critical first step of mitigation strategies, but the analysis often requires extensive data preparation, large modeling effort, and high computing power.

In 2004, realizing this problem, the NOAA Office for Coastal Management (OCM) developed a simple and easy-to-use methodology ‘Nonpoint-Source Pollution and Erosion Comparison Tool’ (NSPECT) to estimate approximate baseline pollution and erosion over a watershed with minimum data requirements. The emphasis on simplicity and the lack of temporal dimension means NSPECT is best used for high-level studies and is not intended to provide an accurate level of pollutants at a particular spot or time.

Tool development

Dewberry (an engineering consulting firm where I am currently employed) recently partnered with the NOAA-OCM to develop ‘QNSPECT’ (QGIS-NSPECT), a QGIS plugin, that modernizes, improves, and brings NSPECT methodology to the wider open-source GIS community.

QGIS was chosen as the platform because it is the most widely used free and open-source desktop GIS software and has a large open-source community to back it. The plugin was written in Python using the awesome processing framework of QGIS and was released in May 2022. The plugin is free, open-source, and available to users of all countries and operating systems.

Link to download plugin: https://plugins.qgis.org/plugins/QNSPECT
Source code repository: https://github.com/NOAA-OCM/QNSPECT

QNSPECT algorithms can be accessed from the QGIS Processing Toolbox.

Basic usage

Documentation

QNSPECT is well documented. Every algorithm has a help section built within the tool GUI that describes the algorithm and its input and output parameters.

Every QNSPECT algorithm has a built-in help section.

Input data

User should possess the following data for the watershed to perform QNSPECT analyses:

1. DEM
2. Precipitation Raster
3. Land Cover Raster
4. Soil Vector Layer (Soil must have hydrologic soil group attribute)
5. Land Cover to Pollutants Lookup Table (optional)
6. R-Factor Raster
7. K-Factor Raster

* 2 is required for pollution analysis only
* 6,7 are required for erosion analysis only

Workflow

A typical workflow to be followed by the user:

1. Gather Data
a. Collect mandatory and optional input data
2. Prepare Data
a. Rasterize soil vector layer
b. Align rasters' extent and snap cells
c. Perform hydrology functions
3. Base Scenario Analysis
a. Provide input data
b. Perform analysis
c. View and verify results
4. Modify Inputs
a. Modify Land Cover / Lookup Table / Precipitation
b. Run Analysis for different scenarios
5. Modified Scenario Analysis
a. Repeat Step 3 with modified data
6. Compare Scenarios
a. Compare base and modified scenarios

Outputs

The final outputs of pollution analysis are the following rasters for each pollutant in the watershed:

  • Local (per cell) pollutant load [mg/year]
  • Concentration (accumulated pollutant mass divided by accumulated runoff volume) [mg/L]
  • Accumulated (all upstream cell) pollutant load [kg/year]
Nitrogen Outputs from Pollution Analysis of QNSPECT on the Black Hawk Lake watershed in Iowa.

Similarly the outputs for erosion analysis are local and accumulated sediment rasters.

Demo

A simple pollution analysis on the Black Hawk Lake watershed in Iowa. Credits: Abdullah Azzam.

Under the hood

The QNSPECT computational engine relies on several established methodologies and algorithms for dataset processing. For example, GDAL for raster analysis, GRASS for material transport, NRCS Curve Number method for runoff generation, and RUSLE for erosion estimates.

The algorithms are flexible, allowing users to either use the default land-cover to pollutant lookup coefficients or provide their own, thus making the tool useful for application on various watersheds and allowing calibration.

The decision-makers can take advantage of QNSPECT’s quick run time and the multitude of geoprocessing tools available in QGIS to quickly modify inputs and run multiple land-use and precipitation scenarios and then compare the impact of each on pollution and erosion.

At the time of publication of this article, the official documentation of QNSPECT is not out yet, but it should be soon at https://coast.noaa.gov/digitalcoast/tools/qnspect.html

Encountered an issue using QNSPECT or have a feature request? create a ticket at https://github.com/NOAA-OCM/QNSPECT/issues

--

--