What is the command to get the band statistics (min/max/etc.) for an image? I know I can do it for a region (using image.reduceRegion
) but I want to have it for the whole image without defining a region.
In EarthEngine, images are potentially huge (think of the landsat ones, that are spatial-mosaics from landsat tiles), so that I think the only way to compute image statistics is with the image.reduceRegion() way.
You could eventually use image.geometry() to define the region, but:
* you might exceed the maxPixels
count.
* the image could be unbounded as in the case of the landsat mosaics
-
Watch out for "unbounded" images (e.g. Landsat mosaics). These may throw an error if you use
image.geometry()
as input toreduceRegion()
: "Provide 'geometry' parameter when aggregating over an unbounded image." – Nicholas Clinton Jul 12 '18 at 17:22