eoreader.bands.alias.to_band

eoreader.bands.alias.to_band

to_band(to_convert: list) list[source]

Convert a string (or real value) to any alias, band or index.

You can pass the name or the value of the bands.

>>> to_band(["NDVI", "GREEN", RED, "VH_DSPK", "SLOPE", DEM, "CLOUDS", CLOUDS])
[<function NDVI at 0x00000154DDB12488>,
<OpticalBandNames.GREEN: 'GREEN'>,
<OpticalBandNames.RED: 'RED'>,
<SarBandNames.VH_DSPK: 'VH_DSPK'>,
<DemBandNames.SLOPE: 'SLOPE'>,
<DemBandNames.DEM: 'DEM'>,
<ClassifBandNames.CLOUDS: 'CLOUDS'>,
<ClassifBandNames.CLOUDS: 'CLOUDS'>]
Parameters

to_convert (list) – Values to convert into band objects

Returns

converted values

Return type

list