Using QGIS's Merge and Rearrange raster tools, I have created a 5-band raster based on:
- A RGB raster with an alpha band,
- A single-band NIR raster.
The original RGB raster's bands are all automatically detected and interpreted by QGIS (screenshot). I want to reproduce this for my new raster.
Using the Raster information... tool (as suggested here), I can see a ColorInterp
parameter in the generated html file. However, I cannot find a matching parameter in the xml file.
Here is a transcription of the metadata:
<PAMDataset>
<PAMRasterBand band="1">
<UnitType>metre</UnitType>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">255</MDI>
<MDI key="STATISTICS_MEAN">137.68055874329</MDI>
<MDI key="STATISTICS_MINIMUM">5</MDI>
<MDI key="STATISTICS_STDDEV">78.204976720939</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
<PAMRasterBand band="2">
<UnitType>metre</UnitType>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">255</MDI>
<MDI key="STATISTICS_MEAN">146.04449533328</MDI>
<MDI key="STATISTICS_MINIMUM">16</MDI>
<MDI key="STATISTICS_STDDEV">72.316293490795</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
<PAMRasterBand band="3">
<UnitType>metre</UnitType>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">255</MDI>
<MDI key="STATISTICS_MEAN">110.86670480457</MDI>
<MDI key="STATISTICS_MINIMUM">0</MDI>
<MDI key="STATISTICS_STDDEV">93.577575298367</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
<PAMRasterBand band="4">
<UnitType>metre</UnitType>
<Metadata>
<MDI key="STATISTICS_MAXIMUM">255</MDI>
<MDI key="STATISTICS_MEAN">181.04600155079</MDI>
<MDI key="STATISTICS_MINIMUM">0</MDI>
<MDI key="STATISTICS_STDDEV">115.71117369521</MDI>
<MDI key="STATISTICS_VALID_PERCENT">100</MDI>
</Metadata>
</PAMRasterBand>
</PAMDataset>
I am using QGIS 3.10 to read and display the raster.
How can I coerce QGIS to default to the proper color interpretation?