Spectral Library not compatible with unmixing application

Issue #330 closed
Florian Beyer created an issue

According to your unmixing tutorial (link) one need the following files for spec lib:

*.sli, *.hdr, *.csv, *.json

I get, however, the following files, when I save a spec lib with enmap box:

*.sli, *.hdr, *.csv, *.sli.aux.xml

So, I guess I have to create the json-file by myself?

Comments (10)

  1. Florian Beyer reporter

    I added a json according to your json file in your tutorial files:

    In my case like this:

    {"class": 
      {"categories": 
        [[0, "bb", [0, 0, 0]],
         [1, "ag", [230, 0, 0]],
         [2, "fo", [56, 168, 0]],
         [3, "wa", [168, 112, 0]],
         [4, "mm", [0, 50, 156]]
        ],
      "no data value": 0,
      "description": "Classification"
      }
    }
    

    I don’t know why I actually have to add this line [0, "bb", [0, 0, 0]],

    but otherwise one class is missing in the in the synthMix window.

    This has to be fixed!

  2. Florian Beyer reporter

    Afterwards I’ve got new errors.

    I tried to adapt my library according to all the properties of the tutorial library.

    I did a lot of changes. Now, the library is not readable anymore in the enmapbox 😞

    It’s so frustrating!

  3. Florian Beyer reporter

    Today, with a fresh start, it worked.

    • 4 classes with around 270 spectra each
    • separately loaded from point shapes using Import profiles from raster + vector source

      in one big spectral library

    following adaptions are necessary after saving the spectral library:

    1. delete the *.xml
    2. generate a *.json file (with the structure I already posted)
    3. I had spectra with the same names in the speclib and, therefore, I had to change the names in the *.csv and the *.hdr (in text editor)

      1. I just renumbered the column spectra name in the csv.
      2. AND replaced the band names with the same numbers in the *.hdr

  4. Benjamin Jakimow

    The `*.sli.aux.xml` is created by GDAL / QGIS automatically and contains additional metadata.
    Actually I am not sure if the proposed *.json approach was a good choice.

  5. Log in to comment