|
| 1 | +--- |
| 2 | +{ |
| 3 | + "id": "st_getbandcolorinterp", |
| 4 | + "title": "ST_GetBandColorInterp", |
| 5 | + "type": "scalar_function", |
| 6 | + "signatures": [ |
| 7 | + { |
| 8 | + "returns": "INT", |
| 9 | + "parameters": [ |
| 10 | + { |
| 11 | + "name": "raster", |
| 12 | + "type": "RASTER" |
| 13 | + }, |
| 14 | + { |
| 15 | + "name": "bandnum", |
| 16 | + "type": "INT" |
| 17 | + } |
| 18 | + ] |
| 19 | + } |
| 20 | + ], |
| 21 | + "aliases": [], |
| 22 | + "summary": "Returns the color interpretation of a band in the raster", |
| 23 | + "see_also": [ "ST_GetBandColorInterpName" ], |
| 24 | + "tags": [ "property" ] |
| 25 | +} |
| 26 | +--- |
| 27 | + |
| 28 | +### Description |
| 29 | + |
| 30 | +Returns the color interpretation of a band in the raster. |
| 31 | + |
| 32 | +This is a code in the enumeration: |
| 33 | + |
| 34 | ++ Undefined = 0: Undefined |
| 35 | ++ GrayIndex = 1: Greyscale |
| 36 | ++ PaletteIndex = 2: Paletted (see associated color table) |
| 37 | ++ RedBand = 3: Red band of RGBA image |
| 38 | ++ GreenBand = 4: Green band of RGBA image |
| 39 | ++ BlueBand = 5: Blue band of RGBA image |
| 40 | ++ AlphaBand = 6: Alpha (0=transparent, 255=opaque) |
| 41 | ++ HueBand = 7: Hue band of HLS image |
| 42 | ++ SaturationBand = 8: Saturation band of HLS image |
| 43 | ++ LightnessBand = 9: Lightness band of HLS image |
| 44 | ++ CyanBand = 10: Cyan band of CMYK image |
| 45 | ++ MagentaBand = 11: Magenta band of CMYK image |
| 46 | ++ YellowBand = 12: Yellow band of CMYK image |
| 47 | ++ BlackBand = 13: Black band of CMYK image |
| 48 | ++ YCbCr_YBand = 14: Y Luminance |
| 49 | ++ YCbCr_CbBand = 15: Cb Chroma |
| 50 | ++ YCbCr_CrBand = 16: Cr Chroma |
| 51 | + |
| 52 | +### Examples |
| 53 | + |
| 54 | +```sql |
| 55 | +SELECT ST_GetBandColorInterp(raster, 1) FROM './test/data/mosaic/SCL.tif-land-clip00.tiff'; |
| 56 | +``` |
0 commit comments