Visualization of PRISMA L2D datasets
After updating the version to 3.7 of EnMap following error is shown during the opening of L2D datasets:
Traceback (most recent call last):
File "C:/Users/Prateek/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\enmapalgorithm.py", line 63, in processAlgorithm
raise Exception('unexpected error')
Exception: unexpected error
Please help.
Comments (13)
-
-
Issue
#589was marked as a duplicate of this issue. -
I’ve tried the same with PRS_L2D_STD_20210301145150_20210301145154_0001.he5 and PRS_L2D_STD_20210307145353_20210307145357_0001.he5.
I used different EnMap-Box 3.7 builds, with the newest and some older python versions of packages and on a different system and always got the same error as described above. Maybe this information helps a little. -
I also get an error when saving the result to the default temp location. Can you please try to specify an output path into an already existing directory, e,g, c:\work
-
Thank you for the fast answer. After doing so, I received the following error.
input:
{ 'file' : 'C:\\Users\\Chris\\Downloads\\PRS_L2D_STD_20210301145150_20210301145154_0001\\PRS_L2D_STD_20210301145150_20210301145154_0001.he5', 'outraster' : 'C:/Users/Chris/Downloads/PRS_L2D_STD_20210301145150_20210301145154_0001/test.tif' }Traceback (most recent call last):
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\enmapalgorithm.py", line 53, in processAlgorithm
result = self.processAlgorithm_(parameters=parameters, context=context, feedback=feedback)
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\importprismal2d.py", line 35, in processAlgorithm_
filenameSpectral=self.parameter(parameters, self.P_OUTRASTER, context),
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\algorithm\importprismal2d.py", line 37, in importPrismaL2D
arrayVnir = offsetVnir + np.transpose(gdal.Open(filenameVnir).ReadAsArray(), [1, 0, 2])[selectedVnir][::-1] * gainVnir
IndexError: boolean index did not match indexed array along dimension 0; dimension is 66 but corresponding boolean dimension is 67Traceback (most recent call last):
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\enmapalgorithm.py", line 53, in processAlgorithm
result = self.processAlgorithm_(parameters=parameters, context=context, feedback=feedback)
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\importprismal2d.py", line 35, in processAlgorithm_
filenameSpectral=self.parameter(parameters, self.P_OUTRASTER, context),
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\algorithm\importprismal2d.py", line 37, in importPrismaL2D
arrayVnir = offsetVnir + np.transpose(gdal.Open(filenameVnir).ReadAsArray(), [1, 0, 2])[selectedVnir][::-1] * gainVnir
IndexError: boolean index did not match indexed array along dimension 0; dimension is 66 but corresponding boolean dimension is 67During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/Chris/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\enmapboxplugin\hubdsm\processing\enmapalgorithm.py", line 63, in processAlgorithm
raise Exception('unexpected error')
Exception: unexpected error -
Ok, now it actually looks like a problem with the dataset: please contact me under andreas.rabe@geo.hu-berlin.de for further instructions.
-
I can reproduce this with the PRS_L2D_STD_20210301145150_20210301145154_0001 scene!
For this scene (and potentially for other scenes too) the “CNM_VNIR_SELECT” metadata item is not valid anymore.
Anyway, I found a workaround for this. Will be fixed in v3.8! (end of March)
-
- changed status to resolved
→ <<cset 479f6ac83db4>>
-
Issue
#640was marked as a duplicate of this issue. -
→ <<cset 479f6ac83db4>>
-
I reworked the PRISMA L2D import. Would be very helpful if you could test, if that is working on your system. Here is a dev-version:
-
I tested it on two Windows PCs with QGIS 3.18 and 3.22 and it worked perfectly for older as well as newer PRISMA acquisitions. The new import tool might be very useful in the future. Thank you very much for the preview.
-
That’s what I wanted to hear
Alright, then I will implement the same logic for PRISMA L1.
- Log in to comment
I testet with this L2D product and it worked fine: PRS_L2D_STD_20200327103506_20200327103510_0001.he5
Please provide your dataset for testing. You can send a download link to andreas.rabe@geo.hu-berlin.de