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

Issue adding tiff image to initial in molusce plugin #8

Closed ranjitsaurav closed 3 days ago

ranjitsaurav commented 9 years ago

I have a vector file which i converted to raster from arcmap in tiff file format. I uploaded the tiff file in qgis in which I intended to use the molusce plugin. When I tried to add the tiff file in the initial of molusce plugin I got the message as "The raster have lots of different values.Does the raster store a nominal variable ?"

Can any one please suggest me why I am getting this message.

Thank you.

simgislab commented 9 years ago

did you add just one tif file?

KolesovDmitry commented 9 years ago

Hello, @ranjitsaurav Please, look at the comment https://github.com/nextgis/molusce/issues/4#issuecomment-98050794 and bellow. I think you have the same cause of the issue.

ranjitsaurav commented 9 years ago

Hi all, Thank you very much for the reply. I do have multiple tiff files and all of them have the same issue. As I mentioned in the earlier post, the raster data is created from arcmap and have the data attributes in terms of "text". I have attached the screen shot of the raster file in arcmap. This same file I uploaded in qgis in which the data value is shown in terms of number. I have attached screen shot of the raster file in qgis also.

I read the previous issue in which the data was continuous. So I assume since my data attribute was originally in term of "text" i am getting this issue in this plugin. Please correct me if I am wrong. Please suggest me if there is any workaround for this issue. Please let me know if I can send my tiff file to you.

Thank you very much for the help.

raster1-arcmap raster2-qgis

simgislab commented 9 years ago

sharing a couple of rasters that produce this error would definitely help.

KolesovDmitry commented 9 years ago

@ranjitsaurav how many different values are stored in the rasters? Are the values nominal?

Could you provide an example of your data?

ranjitsaurav commented 9 years ago

I could not attached my tiff file here so I send the tiff images in your respective email. Please let me know if sending in email is ok.

Thank you very much for the help.

KolesovDmitry commented 9 years ago

Hello @ranjitsaurav , I checked your rasters, the values are quite strange for the plugin purposes:

So I have to ask you some questions:

I think you are doing something wrong with your data. (I'm not speaking about technically wrong, I mean 'logically' wrong).

Molusce constructs statistic models using your data. But to construct a statistic model using all of your values is almost impossible: if a class has one-two samples only, we don't have statistics enough for modeling.

So if the rasters are really landuse data, I advise you to generalize the data (at least you need to remove all rare classes).

ranjitsaurav commented 9 years ago

Hi @KolesovDmitry, Thank you very much for you help and suggestion. I will try to implement the raster file as you have suggested using proper landuse class like agricultural, forest etc. Actually the classes in my raster file is also landuse i.e the classes with 'A' as initial is all agricultural land. So I will try to merge these classes into one and try to use the tool again.

Thank you again for you suggestion.

shCampos commented 6 years ago

Hi I have a same issue, but I'm using QGIS and my image is a file .tif, like this:

help1

How can I select the values that appear the most?

KolesovDmitry commented 6 years ago

Hello, @Breshit really I don't know how to find the most frequent values using QGIS. Usually I use GRASS GIS for such things. But I'm not a QGIS user, I use it very rare. I'm sure there is a way to calculate frequencies of raster values using simple QGIS tools. For example try to create histogram for you raster in style dialog or something like it.

parikhit2009 commented 5 years ago

Hello @KolesovDmitry, @ranjitsaurav I have tried a lot to create raster file from vector layer. I tried different way. But somehow the raster file is not accepting in MOLUSCE . I think I am doing something wrong from very basic. Can you please help me to sort it out. Please tell me how to do that from very first step. ( What should be the content of vector file, How it can be converted to raster file, how to store nominal data into that raster etc) .Its really urgent.

Aurora1203 commented 2 years ago

Thanks for your great comments@KolesovDmitry. I still get another issue, it said that the raster geometry is different. I check them by using erase tool and overlaps etc. They are totally the same. ANy solution for it?

simgislab commented 3 days ago

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