NOAA-OCM / QNSPECT

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

It should not be, but is, possible to reclass from CCAP to NLCD and vice-versa #84

Open NSPECT opened 2 years ago

NSPECT commented 2 years ago

Latest QNSPECT version

Similar requests do not exist

Feature description

Given our current setup, it is possible to reclass from CCAP to NLCD and vice-versa. That doesn't make sense and should not be permitted.

I suggest adding a check on range of values in the incoming raster to determine type and then ask.

Additional context

No response

ar-siddiqui commented 2 years ago

Can you provide more details on where is this happening which tool and process? Is this for the modify land use by name tool?

NSPECT commented 2 years ago

Yes, sorry. It is in the Modify_Land_Use tool. Since we display the combined CCAP+NLCD list of land covers, it is possible to choose the wrong one.

The different classification schemes have different arrays of values. CCAP is 0 through 25 and uses all those values. NLCD's values range from 11 to 95, with just a few of the intermediate values used (19 for the 2001-2006 classification). They use a hierarchical numbering scheme.

I wonder if we can easily & quickly query the uploaded raster for its min and max values. Then use that to determine the classification and to limit subsequent choices. The only confusion in the min-max range is in the unlikely event that someone uses NLCD with only water, glaciers, and developed areas in their raster. I'm not worried about that use case.

Classification schemes attached.

landcover_ccap2001.txt Landcover_nlcd2001_2006.txt

ar-siddiqui commented 2 years ago

I understand. This makes sense but it would require creating a custom widget that can alter choices based on user input. Out of the box functionality of QGIS doesn't allow this. A good one for the future.