1

I want to calculate the mean over an area in Google Earth Engine. I am unable to exactly understand the meaning of scale in the function reduceRegion (https://developers.google.com/earth-engine/apidocs/ee-image-reduceregion) I checked https://developers.google.com/earth-engine/guides/scale but am still not clear. In other examples on stack exchange people have shown examples with landsat and have shown them with scale as 30. As I am trying to understand this, it should be equal to the spatial resolution of the data. And as the landsat data is at 30m spatial resolution, the scale being used is 30?

I am specifically trying to use the data https://developers.google.com/earth-engine/datasets/catalog/MODIS_006_MOD09GA

Is the following code right

region = ee.Geometry.Polygon([

  [[74, 14], [87, 14],[87, 28], [74, 28], [74, 14]]

  ]);
collection_ndvi = ee.ImageCollection('MODIS/MYD09GA_006_NDVI').select('NDVI').filterDate(dates,datee ).mean()
 data = collection_ndvi.reduceRegion(ee.Reducer.mean(), monsoon_region, scale=500).get('NDVI')

I don't know if I am doing this right by using a scale of 500. But the page https://developers.google.com/earth-engine/apidocs/ee-image-reduceregion says that

scale   Float, default: null    
A nominal scale in meters of the projection to work in.

and the data (https://developers.google.com/earth-engine/datasets/catalog/MODIS_006_MOD09GA) is at 500m

2

In this context, scale is the size of one side of a pixel in meters. This is always (?) the case when you find a scale parameter in Earth Engine (more about scale of analysis in EE). Not to be confused with tileScale, which is a unitless parameter to reduce the size of an analysis tile in the event of a User memory limit exceeded error (learn more here).

2
  • So is it correct to use the value of the spatial resolution of data equal to the scale parameter? – Manmeet Singh Apr 7 at 18:44
  • 1
    It is not incorrect. – Nicholas Clinton Apr 8 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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