drag&drop a speclib onto the views area opens a SpectralView and a MapView; should only open a SpectralView

Issue #802 closed
Andreas Janz created an issue

Comments (9)

  1. Benjamin Jakimow

    I don’t consider it a bug but the correct behaviour instead:

    1. enmap_srf_library.gpkg is a vector layer with point geometry data. Data that defines spatial information should be displayed in a map view (as any other vector layer)
    2. enmap_srf_library.gpkg contains a spectral profile field. Therefore it should be added to a spectral library view

    The problem is that enmap_srf_library.gpkg specifies a geometry data field + CRS, which it does not need, as none of the spectral response functions is linked to geometries. Instead, it should be a GPKG without geometry

  2. Andreas Janz reporter

    The problem is that enmap_srf_library.gpkg specifies a geometry data field + CRS, which it does not need, as none of the spectral response functions is linked to geometries. Instead, it should be a GPKG without geometry

    When creating a new speclib, those decisions are already taken. The layer has a point geometry and a valid CRS already:

    How would I, as a GUI user, remove the geometry?

  3. Benjamin Jakimow

    To remove the geometry, just export the GPKG in QGIS without geometry (might be required to assign the SpectralProfile edit widget to the BLOB filed afterwards so that is is stored in the *.qml as well).

    To create a speclib without geometry, create a new vector layer / GPKG without geometry and open it in the Spectral Library Viewer.

  4. Andreas Janz reporter

    Ok, but that is quit complicated and very inconvinient for the user.

    How about that: it doesn’t matter if the layer has a geometry and a CRS defined. We just check if the Extent is not Empty?

  5. Benjamin Jakimow

    Think about remote data sources (PostGIS, WFS, other RDBMS). For these I don’t want to run a potentially time-consuming “calculate extent” operations first, while it is obvious that the speclib is designed to contain spatial data.

    Instead we better give a good example and provide the EnMAP band SRF’s without spatial point geometry, as this clearly does not make any sense.

  6. Andreas Janz reporter

    Think about remote data sources (PostGIS, WFS, other RDBMS). For these I don’t want to run a potentially time-consuming “calculate extent” operations first, while it is obvious that the speclib is designed to contain spatial data.

    Alright, then let’s only check the layer extent for OGR layer.

    Instead we better give a good example and provide the EnMAP band SRF’s without spatial point geometry, as this clearly does not make any sense.

    My problem with that is: if I want to create a non-spatial speclib by using the EnMAP-Box GUI or API, then I don’t want to do an extra workaround step to fix the CRS issue. If the proposed solution with just checking the extent (of an OGR layer) is to complicated, than we should have an Option in the GUI/API to create a non-spatial speclib. That would make more sense, from a user perspective.

  7. Log in to comment