how to only plot some profiles inside SpectralView

Issue #496 closed
Andreas Janz created an issue

Given a spectral view with e.g. 50 profiles.

  1. How to plot no profile at all?
  2. How to plot some profiles (e.g. profiles 1, 3 and 4) ?

Comments (18)

  1. Benjamin Jakimow

    SpectralLibraryWidget and AttributeTableWidget: support basic feature filtering (closes #496) Spectral Libraries: - SpectralProfileRenderer: fixed XML input/output to QML files (addresses #516) - SpectralLibrary constructor can be used like QgsVectorLayer (addresses #515) - refactored context menus in SpectralLibraryPlotWidget (addresses #491) - refactored internal unit model - SpectralProfile: supports basic math operators (add/substract/mul/div), like "SpectralProfile() + 3" (addresses #498)

    Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de

    → <<cset c3fc6d044469>>

  2. Andreas Janz reporter
    • changed status to open

    Ok, but how do I filter for e.g. profile 1, 3 and 4. Is the filtering approache allowing me to freely select any subset of profiles?

  3. Andreas Janz reporter

    Not sure how that works.

    Is that the correct widget?

    Where to put the filter expression: “FID” IN (1,3,4) ?

  4. Benjamin Jakimow

    into the lower left line edit. I’ll add default text and a button to open the filter expression builder (though the idea is neither to reimplement the QgsAttributeTableWidget, nor the QgsFeatureFilterWidget!)

  5. Andreas Janz reporter

    This one?:

    Doesn’t work. Gives me an error, which is not displayed in the GUI, but in PyCharm:

    Evaluation error Column '“FID”' not found

  6. Andreas Janz reporter
    • changed status to open

    Sorry for re-opening, but again, how do I filter for an arbitrary set of profiles? E.g. profile 1, 3 and 4.

    Is filtering really a good way for doing it?

    I have the feeling, that this is to complicated for daily usage!?

  7. Benjamin Jakimow

    Now you can technically filter profile features in the same way as know from other attribute tables in QGIS. This includes simple to very complex queries on attributes, derived values, spatial attributes etc. Your filter expression just needs to meet the QGIS query syntax - if not it is shown in the EnMAP-Box message bar.

    So what’s the problem now?

    As your error says “Column '“FID”' not found” you just need to write an existing field name (use the expression builder to find them), e.g. “fid” in (1,3,4)

  8. Andreas Janz reporter

    It seams to be quite complicated to visualize a set of profiles using a filter expression.

    Is it possible to filter the currently selected features? This way I could Ctlr+LeftMouseClick all the profiles I want to have and set the filter to this selection.

    Would be much more user-friendly.

  9. Benjamin Jakimow

    Indeed that’s an option known from the QGIS AttributeTable that we might discuss. Please open a new issue for and close this (as filtering is enabled now and your initial questions answered)

  10. Log in to comment