Open grantboxer opened 2 months ago
Happy to supply the model if that would help find the issue.
Sure, that would help.
OK see attached.
Essentially, I import the ENMap data and select various bands for calculation of band ratios. This part works.
I then save each virtual image using the EnMAP save raster and then load the saved raster into the project. This seems to be the problem part. It may be that I have some of the settings not correctly set,
Cheers Grant
Grant Boxer
Consultant Geologist (FAIG R.P. Geo)
Perth, Western Australia
Email: @. @.>
Mobile: 0418 954 059
Skype: grantboxer
Website: https://grantboxer.github.io
From: Andreas Janz @.> Sent: Tuesday, 10 September 2024 7:24 PM To: EnMAP-Box/enmap-box @.> Cc: grantboxer @.>; Author @.> Subject: Re: [EnMAP-Box/enmap-box] Crash when using EnMAP box in graphical modeller (Issue #970)
Happy to supply the model if that would help find the issue.
Sure, that would help.
— Reply to this email directly, view it on GitHub https://github.com/EnMAP-Box/enmap-box/issues/970#issuecomment-2340393278 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AFBO2QLYC2ZRSUDVGUTZ6I3ZV3JEJAVCNFSM6AAAAABN6MI3TGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBQGM4TGMRXHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AFBO2QKX3AFTLICKTEPPFZTZV3JEJA5CNFSM6AAAAABN6MI3TGWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTULP6IT4.gif Message ID: @. @.> >
OK see attached.
Can't see the model file. I guess GitHub removes email attachements. Better not reply via Email, just use the website to answer and upload files.
OK see attached - I hope! Change the txt to model3 to run in QGIS. EnMAP_ENVI_Indices_V5_trim.txt
Unfortunately, QGIS is crashing, when opening the .model3 file. Would be good to see a screenshot of the model in the Model Designer, so that I can rebuild it on my own.
I have a feeling it might have something to do with memory allocation in Windows. Most of the time it runs OK, but other times I need to re-boot QGIS to ?clear its memory, and then it runs. There is a lot of memory required with all the temporary files created. Would it be useful if I exported the python script?
Would it be useful if I exported the python script?
Yes, let's try this, maybe the script works.
The script is slightly updated from version 5. Replace the txt with py. EnMAP_ENVI_Indices_V6.txt The model imports the EnMAP file, extracts the necessary bands and calculates the ENVI spectral indices - similar to ASTER mineral ratios.
Looks like you are calculating lot's of indices. Maybe you should think about using the Create spectral indices algorithm:
Note that you can specify your own index formulars directly (e.g. myIndex = r1000 / r2000; where e.g. r1000 and r2000 are the bands at wavelength 1000nm and 2000nm). Alternatively, you could specify all of your algorithms in this file: C:\Users\Andreas\AppData\Roaming\QGIS\QGIS3\profiles\default\python\plugins\enmapboxplugin\enmapboxprocessing\algorithm\createspectralindicesalgorithm.other.json
Hi Andreas,
That sounds like a much better idea! I will have a look and see how I go,
Many thanks Grant
It's probably really a good idea, if you would compile a list of your indices in the format given by createspectralindicesalgorithm.other.json, so that we could make it part of the next EnMAP-Box release. What do you think?
Yes, good idea. I will test a few to make sure I can get it to work OK.
Are able to call specific spectral indices files? I can't see an option to open/import.
No, that is not possible, but I like the idea. Let's have an additional input file parameter "Indices from file", where you can select additional indices to be calculated.
Yes, I think that would be the way to go and allow for specific indices to be imported. How did you use "createspectralindicesalgorithm.other.json"?
It's not optimal, but you could edit those files to include more indices, which you can then use in the Create spectral indices algo.
But the requested feature #988 is a much better solution.
How do I add an extra tab ("type") so I can see new indices on a new tab?
The "type" information is not used by the algorithm. Just specify your indices in one of the JSON files and use them here:
How do I add an extra tab ("type") so I can see new indices on a new tab?
Or are you refering to the Spectral Index Creator app (which is different from the algo)? In this case, no, you can't specify your own "type". You can just use one of those:
I have been having QGIS crash on me recently when running a graphical model with EnMAP algorithms. I think it might have something to do with the "Save Raster As" algorithm. Any assistance appreciated. See crash dump below. Happy to supply the model if that would help find the issue.
Report Details
Python Stack Trace
Stack Trace
QGIS Info QGIS Version: 3.38.2-Grenoble QGIS code revision: 130c432394 Compiled against Qt: 5.15.13 Running against Qt: 5.15.13 Compiled against GDAL: 3.9.2 Running against GDAL: 3.9.2
System Info CPU Type: x86_64 Kernel Type: winnt Kernel Version: 10.0.19045