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

Modify Land Cover (NLCD/C-CAP) is failing to execute. #119

Open mabdazzam opened 11 months ago

mabdazzam commented 11 months ago

Latest QNSPECT version

Similar issues do not exist

What is the bug or the crash?

plugins\QNSPECT\processing\algorithms\modify_land_cover\modify_land_cover_by_nlcdccap.py", line 124, in processAlgorithm land_cover_name = self.choices[enum_value] KeyError: 44

The 'KeyError' number refers to the type of land cover I ask for after the modification. Since I am using the NLCD Land Cover, the KeyError starts from 26 corresponding to the NLCD class 11 (Water) and goes up to 44 - the last class, 95 (Emergent Wetland). It seems like it is unable to fetch the NLCD land cover value provided in the tool.

Steps to reproduce the issue

Get NLCD Land Cover for any extent. (I used Curve Number Generator Plugin to get a small area). Create a vector Area of Interest covering a small portion of the land cover. Run the 'Modify Land Cover (NLCD/C-CAP) processing tool in the 'Data Preparation Section' of QNSPECT. Those are the only two input files required. The final input is an option asking for the desired land cover through a dropdown list. Run and the posted error will be seen.

Screenshots and Attachements

No response

Versions

QGIS version 3.28.9-Firenze QGIS code revision 66f4d63ad4 Qt version 5.15.3 Python version 3.9.5 GDAL/OGR version 3.7.1 PROJ version 9.2.1 EPSG Registry database version v10.088 (2023-05-13) GEOS version 3.12.0-CAPI-1.18.0 SQLite version 3.41.1 PDAL version 2.5.5 PostgreSQL client version unknown SpatiaLite version 5.0.1 QWT version 6.1.6 QScintilla2 version 2.13.1 OS version Windows 10 Version 2009

Active Python plugins CalculateGeometry 0.6.8 coordinate_capture 0.2 curve_number_generator 2.1.2 ee_plugin 0.0.6 GeoCoding 2.19 GroupStats 2.2.7 HCMGIS 23.7.19 joinmultiplelines Version 0.4.1 mapswipetool_plugin 1.2 mmqgis 2021.9.10 OpenTopography-DEM-Downloader 2.0 OSMDownloader 1.0.3 pcraster_tools 0.2.0 pluginbuilder3 3.2.1 plugin_reloader 0.9.3 processing_saga_nextgen 0.0.7 profiletool 4.2.6 qchainage 3.0.1 qgis-maptiler-plugin 3.2 Qgis2threejs 2.7.1 qgis2web 3.16.0 qgis_stac 1.1.1 QNSPECT 1.0 QSWAT3_9 1.5.10 QSWATPlus3_9 2.2.5 QuickOSM 2.2.2 quick_map_services 0.19.33 SRTM-Downloader 3.1.17 tile_plus 0.1 Traffic-Viewer 0.1.1 valuetool 3.0.15 volume_calculation_tool 0.4 wbt_for_qgis 1.0.9 grassprovider 2.12.99 MetaSearch 0.3.6 processing 2.12.99 sagaprovider 2.12.99 latlontools 3.6.13

Additional context

No response