MCPcopy Create free account
hub / github.com/OSGeo/gdal / GDALGetColorInterpretationName

Function GDALGetColorInterpretationName

gcore/gdal_misc.cpp:1244–1377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1242 */
1243
1244const char *GDALGetColorInterpretationName(GDALColorInterp eInterp)
1245
1246{
1247 static_assert(GCI_IR_Start == GCI_RedEdgeBand + 1);
1248 static_assert(GCI_NIRBand == GCI_IR_Start);
1249 static_assert(GCI_SAR_Start == GCI_IR_End + 1);
1250 static_assert(GCI_Max == GCI_SAR_End);
1251
1252 switch (eInterp)
1253 {
1254 case GCI_Undefined:
1255 break;
1256
1257 case GCI_GrayIndex:
1258 return "Gray";
1259
1260 case GCI_PaletteIndex:
1261 return "Palette";
1262
1263 case GCI_RedBand:
1264 return "Red";
1265
1266 case GCI_GreenBand:
1267 return "Green";
1268
1269 case GCI_BlueBand:
1270 return "Blue";
1271
1272 case GCI_AlphaBand:
1273 return "Alpha";
1274
1275 case GCI_HueBand:
1276 return "Hue";
1277
1278 case GCI_SaturationBand:
1279 return "Saturation";
1280
1281 case GCI_LightnessBand:
1282 return "Lightness";
1283
1284 case GCI_CyanBand:
1285 return "Cyan";
1286
1287 case GCI_MagentaBand:
1288 return "Magenta";
1289
1290 case GCI_YellowBand:
1291 return "Yellow";
1292
1293 case GCI_BlackBand:
1294 return "Black";
1295
1296 case GCI_YCbCr_YBand:
1297 return "YCbCr_Y";
1298
1299 case GCI_YCbCr_CbBand:
1300 return "YCbCr_Cb";
1301

Callers 15

RunStepMethod · 0.85
AnalyseRasterMethod · 0.85
GDALInfoFunction · 0.85
BandComparisonMethod · 0.85
SerializeToXMLMethod · 0.85
GTIFFBuildOverviewsExFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected