The Google Earth Engine API doc has function to get max value of some bands. But how to get the max value of one image?

  • Hello and welcome! You want the max at each pixel across all the bands (a single-band image output) or the single number that is the max of all values in all pixels in all bands (number as output)?
    – J Kelly
    Dec 24, 2018 at 21:09
  • Thanks,I want the single max at one band. For example,get the max value from a Landsat 8 red band.I can use the 'quick stats' to get the single max value of one band in ENVI. But,i don't know how to get that in GEE.
    – J.Frank
    Dec 25, 2018 at 2:52

1 Answer 1


.reduceRegion works if the geometry is reasonably small.

https://code.earthengine.google.com/8d71b1f03571c4510be90381928f3925 (I drew a polygon region.)

var RedBandIMAGE   = ee.Image( 'LC8_L1T_TOA/LC80410362015107LGN00' ).select( ['B4'] );
var maxReducer = ee.Reducer.max();
var theMax = RedBandIMAGE.reduceRegion(maxReducer, geometry);
Map.setCenter( -118.2733, 34.0942, 12 ); 
Map.addLayer( RedBandIMAGE,   {min:0, max:0.17, palette:'000000,ff5555'},     'RedImage'   );
  • 1
    What about large geometries?
    – OscarBau
    Jun 1, 2021 at 15:44

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .