geopyspark.geotrellis.combine_bands module

geopyspark.geotrellis.combine_bands.combine_bands(layers)

Combines the bands of values that share the same key in two or more TiledRasterLayers.

This method will concat the bands of two or more values with the same key. For example, layer a has values that have 2 bands and layer b has values with 1 band. When combine_bands is used on both of these layers, then the resulting layer will have values with 3 bands, 2 from layer a and 1 from layer b.

Note

All layers must have the same layer_type. If the layers are TiledRasterLayers, then all of the layers must also have the same TileLayout and CRS.

Parameters:layers ([RasterLayer] or [TiledRasterLayer] or (RasterLayer) or (TiledRasterLayer)) –

A colection of two or more RasterLayers or TiledRasterLayers. The order of the layers determines the order in which the bands are concatenated. With the bands being ordered based on the position of their respective layer.

For example, the first layer in layers is layer a which contains 2 bands and the second layer is layer b whose values have 1 band. The resulting layer will have values with 3 bands: the first 2 are from layer a and the third from layer b. If the positions of layer a and layer b are reversed, then the resulting values’ first band will be from layer b and the last 2 will be from layer a.

Returns:RasterLayer or TiledRasterLayer