how to only plot some profiles inside SpectralView
Given a spectral view with e.g. 50 profiles.
- How to plot no profile at all?
- How to plot some profiles (e.g. profiles 1, 3 and 4) ?
Comments (18)
-
-
- changed status to closed
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>>
-
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?
-
“FID” IN (1,3,4)“fid” IN (1,3,4)
It’s common QGIS filter syntax, see https://docs.qgis.org/3.10/en/docs/user_manual/working_with_vector/attribute_table.html?highlight=filter#filtering-features for details
-
- changed status to closed
-
reporter Not sure how that works.
Is that the correct widget?
Where to put the filter expression: “FID” IN (1,3,4) ?
-
reporter - changed status to open
-
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!)
-
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
-
-
- changed status to closed
adds filter expression builder to SpectralLibraryWidget and AttributeTableWidget and connects them with EnMAP-Box message bar closes
#496Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de
→ <<cset 5136dc5d43fe>>
-
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!?
-
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)
-
@Andreas Janz are you now able to filter profiles by “fid” or whatever is needed?
-
- marked as minor
- marked as enhancement
-
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.
-
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)
-
reporter - changed status to closed
Not quit sure why to close this issue, but we can of course start with a fresh one.
- Log in to comment
This should be done by feature filtering, as known from QGIS Attribute tables