nextgis / qgis_molusce

Modules for Land Use Change Simulations
https://github.com/nextgis/molusce
GNU General Public License v2.0
43 stars 15 forks source link

AttributeError #18

Closed nikolichn closed 3 days ago

nikolichn commented 7 years ago

Been trying to crack it the whole day. Exported the raster both in ArcGIS and QGIS, still get the same error. Everything is fine until i get to the CA simulation and get the following error:

An error has occurred while executing Python code:

AttributeError: 'NoneType' object has no attribute 'getBandGradation' Traceback (most recent call last): File "C:/Users/Nemanja Nikolic/.qgis2/python/plugins\molusce\moluscedialog.py", line 528, in simulationDone grad = res.getBandGradation(1) AttributeError: 'NoneType' object has no attribute 'getBandGradation'

And this is in from the message tab:

[Sun Oct 30 2016 20:08:01] Start logging [Sun Oct 30 2016 20:08:05] Set intial layer to g100_00_AdmBelgrade [Sun Oct 30 2016 20:08:06] Set final layer to g100_06_AdmBelgrade [Sun Oct 30 2016 20:08:13] Added factor layer WaterDist [Sun Oct 30 2016 20:08:36] Change Map is created [Sun Oct 30 2016 20:08:39] Class statistics and transition matrix are updated [Sun Oct 30 2016 20:08:42] Init ANN model [Sun Oct 30 2016 20:08:42] Set training data [Sun Oct 30 2016 20:08:43] Start trainig ANN model [Sun Oct 30 2016 20:14:09] ANN model trained [Sun Oct 30 2016 20:15:13] Simulation process is started [Sun Oct 30 2016 20:15:13] ERROR: An unknown error occurs during ANN prediction [Sun Oct 30 2016 20:15:13] ERROR: An unknown error occurs during simulation

Thanks Nemanja

P.S. Using CORINE 2000 and 2006 tiff 100x100 files

KolesovDmitry commented 7 years ago

The root of the issue somehow connected with ANN prediction:

[Sun Oct 30 2016 20:15:13] ERROR: An unknown error occurs during ANN prediction

The model can't process input data and finally returns None as the result of prediction/simulation.

Could you provide links to you input files?

nikolichn commented 7 years ago

Figured it out. The Raster had a preset Non Value at 45, and i was setting it to 0 when i was doing the Raster Clip in QGIS. It seems to have fixed the problem. :) I changed it to 45, and it works.

But still getting strange results of simulation. Here are the files i have been using and the simulation result.

MOLUSCE Test.zip

I intentionally used ANN because my Spatial variables aren't the greatest, so i was looking for methods that would bypass them. Does the CA Simulation take the Spatial variables into consideration if you choose ANN or Logistic regression? :)

simgislab commented 3 days ago

Try brand new MOLUSCE 4 for QGIS 3 and let us know if the problem persists