Errors when using EnMap version 3.6

Issue #377 resolved
Shafira created an issue

I have installed Enmap plugin version 3.6 in Qgis 3.12 on a 64-bit laptop. I wanted to perform image classification via Random Forest (RF) using Enmap and Graphical Modeler (GM). Therefore, I used a raster image and a shapefile sample as the reference for classification.

At first, I tried to run RF in Enmap, the total samples showed were 90285 pixels for the reference samples. Then the classification works. Later, I used the GM with the workflow as shown below:

Then, it showed me this error.

It said that there were things missing such as the javascript and the stylesheet. Therefore, I tried to copy them from Enmap 3.5 and pasted them into EnMap 3.6 in the hubflow folder. FInally it works!

However, I found that in the accuracy assessment, the total samples showed were 91035.

It was different from the previous that was shown in EnMap with 90285 samples. So, I tried to uninstall EnMap 3.6 and install back EnMap 3.5. Then I noticed that the samples were 90734 in EnMap 3.5. Then I tried to run the GM using the same image and reference samples. It worked fine and the accuracy assessment report produced also showed the total samples were 90734.

Also, I found that, when I import the image into EnMap 3.6, the samples overlaid on the raster image. However, sometimes when I import the same image and samples, the samples were not overlaid on the raster image.

Comments (8)

  1. Andreas Janz

    @Benjamin Jakimow after moving HUBFLOW to the box repo, some non-python files seam to be missing in the final ZIP file:

    Should look like this:

    I guess this is a general problem/feature, that some files will be removed silently.

    Moved this aspect of the discussion to issue #379

  2. Andreas Janz

    @Shafira the different number of samples (90285 vs 90734) could be explained by different default values inside the “Classification from Vector” algorithm.

    Does that explain it? If not, just send the data and I can have a look.

  3. Shafira reporter

    The parameter was set to be the same when doing in EnMap 3.5 and 3.6. However, EnMap 3.6 gave a different number of samples.

    I found difficulties to attach the samples and the raster image on this issue (probably due to my internet connection here). Thus, the data can be obtained from http://www.filedropper.com/data_10. Please let me know if you couldn’t download the data.

  4. Benjamin Jakimow

    The missing *.css and *.js issue is fixed. See scripts/create_plugin.py, line 114ff:

    None-python files can be added either explicitly files.append(…) or by modifying the regex pattern

    # copy python and other resource files
    pattern = re.compile(r'\.(py|svg|png|txt|ui|tif|qml|md|js|css)$')
    files = list(scantree(DIR_REPO / 'enmapbox', pattern=pattern))
    files.extend(list(scantree(DIR_REPO / 'site-packages', pattern=pattern)))
    files.extend(list(scantree(DIR_REPO / 'hubflow', pattern=pattern)))
    files.extend(list(scantree(DIR_REPO / 'hubdc', pattern=pattern)))
    files.extend(list(scantree(DIR_REPO / 'enmapboxgeoalgorithms', pattern=pattern)))
    files.append(DIR_REPO / '__init__.py')
    files.append(DIR_REPO / 'CHANGELOG.rst')
    files.append(DIR_REPO / 'CONTRIBUTORS.rst')
    files.append(DIR_REPO / 'LICENSE.md')
    files.append(DIR_REPO / 'LICENSE.txt')
    files.append(DIR_REPO / 'requirements.txt')
    files.append(DIR_REPO / 'requirements_developer.txt')
    

  5. Andreas Janz

    I can reproduce the (slight) differences in number of samples between V3.5 and v3.6.

    Honestly, I can not fully explain the reason for that :-(. Must be a subtle implementation detail that changed in the background. Sorry for beeing not very precise on that one.

  6. Log in to comment