Reduce over space

Use the function below to calculate the minimum and maximum of an image.

Use the function below to calculate the minimum and maximum of an image.

reduceRegion(reducer,
geometry,
scale,
crs,
crsTransform,
bestEffort,
maxPixels,
tileScale)

The example below derives the minimum and maximum value of a high resolution digital elevation model in Australia.

picturesaus

Digital elevation model of Darwin and Kakadu National Park. High resolution DEM data is available for parts of Australia in the Google Earth Engine. These data were obtained by surveys and cover Australia’s populated coastal zone; floodplain surveys within the Murray Darling Basin, and individual surveys of major and minor population centres.

link


// User specified parameters

// create the vizualization parameters
var viz = {min:-10.0, max:100, palette:"1400f7,00f4e8,f4f000,f40000,960424"};

// Data

// import the dem
var dem = ee.Image("AU/GA/AUSTRALIA_5M_DEM/NT").select("elevation");

// convert area to to polygon
var area = dem.gt(-10).reduceToVectors({scale: Map.getScale() * 0.2,maxPixels:20000000});

// functions

// Reduce the collection.
var extremes = dem.reduceRegion({reducer:ee.Reducer.minMax(),
geometry:area,
maxPixels:300000000});

print(extremes);
// Add to map

Map.addLayer(dem,viz,"Digital elevation model");
Map.addLayer(area,undefined,"Area");
Map.centerObject(area,8);

Leave a Reply