TransWikia.com

Merging the bands of a single image in GEE python API

Geographic Information Systems Asked by Rolandana on May 28, 2021

I currently have a single image with 3 bands with different turbidity data, all from the same region. The pixel values of the 3 bands do not overlap with each other. I would like to merge these 3 bands into one, while keeping the turbidity data intact.

Just as an example, I made 1 image, with multiple bands from a image collection:

Image1 = Collection1.toBands()

The image made from this collection looks something like this

Image1
band1: 0, 0, 0, 2
band2: 0, 0, 2, 0
band3: 2, 0, 0, 0

I would like to transform this into a single image with 1 band, for example:

Image2:
band1: 2, 0, 2, 2

Is there a way to accomplish this?

One Answer

You are looking to create an image mosaic:

mosaic1 = Collection1.mosaic() 

Tutorial on compositing and mosaicing: https://developers.google.com/earth-engine/guides/ic_composite_mosaic

Correct answer by korndog on May 28, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP