Request for Changes-54: Get OTB ready for gdal derived subdatasets

From OTBWiki
Jump to: navigation, search



There are only a few changes that will get OTB ready to read DERIVED_SUBDATASETS, which is what this RFC is meant for.


Starting 2.2, Gdal will support derived subdatasets, e.g. for image myImage.tif, gdal will understand the following syntax:


This will make gdal read myImage.tif by computing the amplitude of each input band.

Available subdatasets are:

{ "AMPLITUDE", "Amplitude of input bands", "mod", "complex","Float64"}
{ "PHASE", "Phase of input bands", "phase", "complex","Float64"}
{ "REAL", "Real part of input bands", "real", "complex","Float64"}
{ "IMAG", "Imaginary part of input bands", "imag", "complex","Float64"}
{ "CONJ", "Conjugate of input bands", "conj", "complex","CFloat64"}
{ "INTENSITY", "Intensity (squared amplitude) of input bands", "intensity", "complex","Float64"}
{ "LOGAMPLITUDE", "log10 of amplitude of input bands", "log10", "all","Float64"}

This will be very useful for SAR processing with OTB and Monteverdi, as we can now directly access phase or amplitude of SLC products. This way, we can for instance load the amplitude of such products (with valid overviews, as derived datasets support overviews) in Monteverdi, making rfc-39 obsolete, or directly orthorectify the amplitude of an SLC product (no more computation of the amplitude image preprocessing).

It is important to note that this RFC gets OTB ready for DERIVED_SUBDATASETS, while still supporting gdal versions < 2.2.

Implementation details

There are only two things that needed to be changed:

  • Make otb::ImageFileReader test file existency on the actual file when encountering a derived subadataset,
  • Make otb::ImageFileReader use the the actual file to read the ossim keyword list.

Here is the complete diff: