Skip to content

Band Filter

The BandFilter operator selects bands from a raster source by band names or band indices.

It removes all non-selected bands while preserving the original order of remaining bands.

The BandFilter operator expects exactly one raster input.

The operator returns an error if no bands are selected or if selected band names/indices cannot be mapped to existing input bands.

Name Type Description Examples
bands BandsByNameOrIndex Selected bands either by names (e.g. ["nir", "red"]) or indices (e.g. [0, 2]).
Name Type Description
raster RasterOperator An operator that produces raster data.
{
"type": "BandFilter",
"params": {
"bands": ["nir", "red"]
},
"sources": {
"raster": {
"type": "MultiBandGdalSource",
"params": {
"data": "sentinel-2-l2a_EPSG32632_U16_10"
}
}
}
}