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?

Vincent,

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.

gdal_translate -b 3 -b 2 -b 1 -of VRT in_bgr.tif out_rgb.vrt

(you can do that with GDALTranslate() API)

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to