Let the user select the output number of components in Transform Raster

Issue #883 wontfix
Agustin Lobo created an issue

In most cases, the user does not require as many components as original bands and writing all components

is a waste of time and space. Obvious example is PCA.

Comments (13)

  1. Agustin Lobo reporter

    Right, but this is a really important and very commonly used parameter that should have its own button, otherwise the (probably hasty) user will not be aware of it. Anyway, as there is a way to accomplish it, this is not a priority issue.

    Also, in particular for PRISMA images, an option to select input bands would be convenient (as there are quite a number of them that might be better to ignore). Or use a bbl field as in envi. In other cases, the user might want to apply the transform to just the VISNIR part, or the SWIR etc. Being able to select input bands avoids the need of making multiple similar copies of the data.

  2. Andreas Janz

    an option to select input bands would be convenient 

    This is a general issue. Almost every algorithm with a raster input could have a band subset selection widget. Currently, we decided to not do that, in favour of more concise dialogs. We thought that having such blocks everywhere is not so nice (… but maybe we should rethink that?):

    Being able to select input bands avoids the need of making multiple similar copies of the data.

    You wouldn’t need to make a hard copy. Instead you should create a lightweight VRT raster:

  3. Andreas Janz

    To allow for a more convinient band subsetting, we could have a shortcut “Subset bands” in the context menu here, right next to “Save as” option:

    In the “Subset bands” algorithm dialog, you can only select the band subset for the given raster:

    And the result will always be a VRT raster:

  4. Andreas Janz

    In other cases, the user might want to apply the transform to just the VISNIR part, or the SWIR etc.

    that is planned, see #879

  5. Andreas Janz

    Or use a bbl field as in envi.

    We currently only use the BBL information in the Translate raster layer algorithm. Here you can chose to exclude BBL bands.

    Any other ideas, where to use BBL?

  6. Agustin Lobo reporter

    The previous “Subset bands + vrt” step that you suggest is a very general god way to select input bands.

    I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter

    for defining the result. In most cases the user will no be keeping all components.

    Any other ideas, where to use BBL?

    Besides all transforms, by now this is what I can think of:

    • In the spectral plots (eg. option “apply BBL filter” or “exclude bad bands”)
    • In the future “Subset bands”, optionally bad bands could get automatically ticked ((so the user saves ticking many squares),

  7. Andreas Janz

    I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter

    Alright, I will overhaul the transform algorithms soon and take this into concideration.

    In the spectral plots (eg. option “apply BBL filter” or “exclude bad bands”)

    Yes: #903

  8. Andreas Janz

    I still think that, for PCA and other transforms, the output nb. of components should have its own button. This is almost an inherent parameter

    We discussed this today in the team and decided to not implement a widget for selecting the number of component.

    We will edit the default code snippets and add the according keyword. E.g. for PCA we will have:

    pca = PCA(n_components=None)
    

  9. Log in to comment