I am relatively new to Google Earth Engine, currently working on finding mean NDVI for command areas of different tube wells in my study area.
What I have done so far is:
Filtered L8 image collection for the months of Jan and Feb for 2014-2019
Imported the feature collection which contains the command areas
Masked out clouds, and mosaiced according to acquired date (which reduced the size of image collection from 377 to 87)
What I am trying to do is, to apply reduceRegions and map it to the image collection, so that I can export a table of 613 (number of features in the Fc, sorted by ID) * 87 (images in the image collection, sorted by date)
When I try to do reduce regions for a single image, the output is a feature collection with 613 features and columns corresponding the the attributes of the features
var reduced = mapNDVI.first().reduceRegions({
collection:cmdArea ,
reducer:ee.Reducer.mean(),
scale: 30
});
which gives
featureCollection (613 elements, 46 columns)
type: FeatureCollection
columns: Object (46 properties)
features: List (613 elements)
When I try to map this over the image collection of 87 L8 images,
var reduced = mapNDVI.map(function(image){
return image.reduceRegions({
collection:cmdArea ,
reducer:ee.Reducer.mean(),
scale: 30
});
});
this gives
FeatureCollection (87 elements, 0 columns)
type: FeatureCollection
columns: Object (0 properties)
features: List (87 elements)
Can anyone help me with how to go abou mapping reduce regions over an image collection to obtain a table of (number of features * number of images)?
Please find the code below: https://code.earthengine.google.com/7dd30af72b3685f673d4d1afa97334c4