Transform Raster Layer: let the user select output file format

Issue #1066 resolved
Agustin Lobo created an issue

Only tif files can be selected as output. User should be able to select the format.

Comments (15)

  1. Andreas Janz

    That is true. Almost every EnMAP-Box algorithm will create (compressed) GTiff files.

    Some create VRTs.

    Only “Save as” and “Translate raster layer” let’s you store ENVI.

  2. Agustin Lobo reporter

    Which is a waste of disk space and time for the user. I suggest you let the user decide at least among the common file formats in hyperspectral imagery. If you have Save as… done it should not be complicated providing that flexibility always.

  3. Andreas Janz

    Hi Agus,

    I removed ENVI files as possible outputs, because GDAL isn't creating proper *.hdr header files. All the spectral metadata would be missing.

    You would need to fix this by calling “Write ENVI header” afterwards. Here:

    Or here:

    So in principle, I could allow writing ENVI files, but the user needs to be aware of the issue with the header file.

  4. Agustin Lobo reporter

    Yes, I recall that limitation, which is not your responsibility. Having the tool to create correct hdr files and warn the user (i.e. in a “Known issues and limitations” section in the manual) is the most you can do. But do not totally cut the option of writing envi formats for the user. Let the user decide.

  5. Agustin Lobo reporter

    Great, thanks.

    Perhaps you could fill a ticket in GDAL (sure your opinion will have a lot of weight) and provide them with your code for writing a fully correct hdr file.

  6. Benjamin Jakimow

    At least we should support the same raster formats like QGIS (which already allows to choose the interleave).

  7. Andreas Janz

    The main problem is the metadata. When you translate a spectral raster with GDAL, important metadata like wavelength and fwhm are missing in the ENVI *.hdr file.

  8. Benjamin Jakimow

    It isn’t. Compared to the QGIS QgsRasterLayerSaveAsDialog it misses several file formats and file options.
    The help box also shows some general information only, but not file format specific options.

    For example here: ENVI BIL is selected, but shows a BIGTIFF=YES option, which is not used by ENVI format at all.

  9. Andreas Janz

    @Benjamin Jakimow , first of all, you started a totally new discussion, and second, in that new discussion, I think you are wrong 😅 .

    Let’s discuss this in our next tech talk.

  10. Log in to comment