2

The image has the band : ['B1', 'B2', ..., 'B11', 'NDVI', 'NDWI']. The goal is to select the bands which not start with 'B' using regex. In another words, ['NDVI', NDWI']. What I know is that using image.select("B.*") to select bands start with 'B'. But I do not know to reverse the selection.

1 Answer 1

5

You can do like this:

image.select('[^B].*')

Not the answer you're looking for? Browse other questions tagged or ask your own question.