On mercredi 14 décembre 2016 14:21:39 CET Vincent BERNAT wrote:
> Hi all,
> I got some products which have a wrong band ordering in raster but the good
> one in metadata.
> In my c++ application, what are the gdal functions to call to set the new
> band ordering ?
> Is it possible?
Are you talking about the order of th band regarding their color interpretation ? You can indeed have Band 1 = Blue, Band 2 = Green, Band 3 = Red in some cases. GDAL drivers will not reorder them to be in R,G,B order. If you need this, you need to handle that at the application level, by for example issuing Dataset RasterIO with the 3,2,1 order. You could also create a VRT that reorder the bands.