0

In GEE, when I want to use the select method of the Image object with integer, what is the indexing system, starting from 1 or 0 ?

ee.Image('image_ID').select(1) 

// or 

ee.Image('image_ID').select(0)

1 Answer 1

0

It's 0 based.

var image = ee.Image('UMD/hansen/global_forest_change_2020_v1_8')
print('All bandnames:', image.bandNames())
print('select(0): ', image.select(0).bandNames())
print('select(1): ', image.select(1).bandNames())

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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