<div dir="ltr"><div>Hi, I'm writing to you because I need support for the new Landsat-8 metadata format (_MTL.txt file)</div><div><br></div><div>I took a look at the latest version, 1.11.0, and I couldn't find anything on the matter. So, I was thinking I could add support for the new format by myself.</div>
<div><br></div><div>There are 3 groups of bands: panchromatic, multispectral and thermal. One .tif file for each band and then the MTL file with all the info. I'd like to open the MTL file, using GDAL, and have access to all of them. So, what I was thinking was that I could add a public method (virtual) to the GDALDataset class, lets say GetSubDatasets, that would allow a dataset to return associated subdatasets. Then, in the FASTDataset class, if I detect that I'm trying to open a MTL file, I could make the FASTDataset::Open method return a Dataset (as it does now) containing only the multispectral bands and then with the overridden GetSubDatasets method I could get a vector with the other 2 datasets: one with the panchromatic band and another one with the thermal bands.</div>
<div><br></div><div>What do you think?</div><div><br></div><div><span style="font-family:arial,sans-serif;font-size:13px">Any idea, suggestion or comment is very welcome :)</span><br></div><div><br></div><div>Sample:</div>
<div><br></div><div>class CPL_DLL GDALDataset : public GDALMajorObject</div><div>{</div><div>[...]</div><div>public: </div><div>    virtual GDALDataset* GetSubDatasets() { return NULL; }</div><div>[...]</div><div>}</div><div>
<br></div><div>class FASTDataset : public GDALPamDataset</div><div>{</div><div>[...]</div><div>private:</div><div>    GDALDataset* porSubDatasets;</div><div>[...]</div><div>public:</div><div>    virtual GDALDataset* GetSubDatasets();</div>
<div>[...]</div><div>}</div><div><br></div><div>GDALDataset *FASTDataset::Open( GDALOpenInfo * poOpenInfo )</div><div>{</div><div>    /**</div><div><br></div><div>    IF mtl</div><div>        LOAD main dataset</div><div>        LOAD subdatasets</div>
<div>        RETURN main dataset</div><div><br></div><div>    **/</div><div><br></div><div>    int i;</div><div><br></div><div>    if(poOpenInfo->nHeaderBytes < 1024)</div><div>        return NULL;</div><div><br></div>
<div>[...]</div><div>}</div><div><br></div><div><div style="font-family:arial,sans-serif;font-size:13px">Thanks in advance.</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div style="font-family:arial,sans-serif;font-size:13px">
Regards,</div><div style="font-family:arial,sans-serif;font-size:13px">Daniel.</div></div></div>