NOAA-OCM / QNSPECT

QGIS Plugin for NOAA Nonpoint Source Pollution and Erosion Comparison Tool (NSPECT)
GNU General Public License v2.0
8 stars 5 forks source link

Limit pollutant and erosion calculations to a selected polygon area #87

Open NSPECT opened 2 years ago

NSPECT commented 2 years ago

Latest QNSPECT version

Similar requests do not exist

Feature description

Somehow we completely missed the functionality to only run over a selected subset of watersheds/catchments in an Area of Interest. This was initially done to save run time. The current tool is even slower, so it may be worth investigating.

Additional context

No response

ar-siddiqui commented 2 years ago

74 requests a similar feature.

I don't think analysis algorithms should worry about working with subsets. This should be handled in Data Preparation > Align Rasters as requested by #74. Doing this in analysis algorithms is against the design philosophies initially discussed:

  1. The separation of concerns: The analysis modules should only do its part and the data preparation should happen beforehand.
  2. Data preparation should happen only once. Masking rasters in analysis modules would mean that in every run, the tool would first run the Align Rasters internally.

IMO this should be closed and #74 implemented.

DaveEslinger commented 2 years ago

This is a very common use case. For example, here is an actual instance: a user wanted to study pollution & erosion over an entire island. They got all needed data sets, aligned them, but found processing as one entire area took too long. They then were able to run the same scenario multiple times, just selecting different watershed polygons. There was a clip, or mask, on-the-fly that was applied and didn't really slow down the processing.

Requiring a completely different set of data to be extracted for each sub-area is not a desired solution. However, with the current work flow, this may be difficult.

ar-siddiqui commented 2 years ago

I see. Just for awareness and future reference, this might be possible to do with the first release as well using QGIS batch processing once #74 is implemented.

In fact, it would happen with just a couple of steps vs running the model multiple times. Although it might take some preparation and setup.

DaveEslinger commented 2 years ago

Excellent, I am hoping it can be done. It would be ideal for batch use. In fact, for a batch setting, it would probably be easiest to have the polygon areas be different layers, instead of different selections of the same layer. I'm not sure how that would work. But having a bunch of saved polygons is much easier to manage than a bunch of saved raster groups.

ar-siddiqui commented 2 years ago

I think writing up a few blog posts and example tutorials on different use cases will be one way to show the tool's true prowess in conjunction with QGIS.