Visualization of PRISMA L2D datasets

Issue #611 resolved
Prateek Tripathi created an issue

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)

  1. Christopher L.

    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.

  2. Andreas Janz

    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

  3. Christopher L.

    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 67

    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 67

    During 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

  4. Andreas Janz

    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)

  5. Christopher L.

    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.

  6. Log in to comment