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
TiledRasterLayer
s.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 andlayer b
has values with 1 band. Whencombine_bands
is used on both of these layers, then the resulting layer will have values with 3 bands, 2 fromlayer a
and 1 fromlayer b
.Note
All layers must have the same
layer_type
. If the layers areTiledRasterLayer
s, then all of the layers must also have the sameTileLayout
andCRS
.Parameters: layers ([ RasterLayer
] or [TiledRasterLayer
] or (RasterLayer
) or (TiledRasterLayer
)) –A colection of two or more
RasterLayer
s orTiledRasterLayer
s. 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
islayer a
which contains 2 bands and the second layer islayer b
whose values have 1 band. The resulting layer will have values with 3 bands: the first 2 are fromlayer a
and the third fromlayer b
. If the positions oflayer a
andlayer b
are reversed, then the resulting values’ first band will be fromlayer b
and the last 2 will be fromlayer a
.Returns: RasterLayer
orTiledRasterLayer