Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A change map is not being created #68

Open
taras-user opened this issue Dec 3, 2024 · 2 comments
Open

A change map is not being created #68

taras-user opened this issue Dec 3, 2024 · 2 comments

Comments

@taras-user
Copy link

A change map is not being created.
The source data have the same coverage and the same coordinate system

Use QGIS --- 3.34.13-Prizren Ubuntu 22.04

Errors when executing a Python script
ValueError: 255 отсутствует в списке

         Traceback (последний последний вызов):
          Файл "/home/taras/.local/share/QGIS/QGIS3/profiles/default/python/plugins/molusce/algorithms/models/area_analysis/manager.py", строка 110, in getChangeMap
          self.makeChangeMap()
          Файл "/home/taras/.local/share/QGIS/QGIS3/profiles/default/python/plugins/molusce/algorithms/models/area_analysis/manager.py", строка 135, in makeChangeMap
          band[i, j] = self.encode(r, c)
          Файл "/home/taras/.local/share/QGIS/QGIS3/profiles/default/python/plugins/molusce/algorithms/models/area_analysis/manager.py", строка 100, in encode
          return self.categories.index(initialClass) * m + self.categories.index(
         ValueError: 255 отсутствует в списке
           
          Python: 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0]
                      Version: 3.34.13-Prizren Prizren, 222b59952c9
                    
         Python location:             
         /usr/share/qgis/python/home/taras/.local/share/QGIS/QGIS3/profiles/default/python/home/taras/. local/share/QGIS/QGIS3/profiles/default/python/plugins/usr/share/qgis/python/plugins/usr/lib/python310.zip/usr/lib/python3.10/usr/lib/python3.10/lib-dynload/home/taras/.local/lib/python3. 10/site-packages/usr/local/lib/python3.10/dist-packages/usr/lib/python3/dist-packages/usr/lib/python3.10/dist-packages/home/taras/. local/share/QGIS/QGIS3/profiles/default/python/usr/lib/python3/dist-packages/IPython/extensions/home/taras/QGIS/DNESTR_LIM/CORE_DATA/NDVI_SPAT_SEAS
@eduard-kazakov
Copy link
Contributor

@RemeshevskiyValeriy is it related to #60 ?

@RemeshevskiyValeriy
Copy link
Contributor

Yeah, it is related to #60

This error indicates that the list of unique values of the initial and final rasters does not match. At this stage, the list of unique values of the initial raster is the leading one.

I can assume that 255 is the "no data" value that is contained in the final raster. If this is the case, then you can try to fill "no data" pixels with pixel values from the initial raster, if this possible solution, in turn, is appropriate in the context of the study.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants