[GIS] Index of band with minimum and maximum values Google Earth Engine

google-earth-engine

I have a multiband image with the bands labelled t1 to t12 representing 12 timesteps. I want to know the timestep (band) of the minimum and maximum values for each pixel and convert this timestep to an integer e.g. t7 = 7. Some timesteps have masked values.

Link to the code is here https://code.earthengine.google.com/c9e145f1be528339e1b96d03da12b3ab

Best Answer

You would probably like to do something similar to this question: Question Gianca

For your case, this might what you want to do:

link to Script. As an example I added a 'time' band (from 1-12) and used your "median_ndvi" band. You could write a function to do this for all your bands.

Related Question