I extracted pixel values at given points in the Google Earth Engine from the vegetation cover data set MOD44B.006:


That is the code I used:

// Load Data 
var dataset = ee.ImageCollection('MODIS/006/MOD44B');

var visualization = {
  bands: ['Percent_Tree_Cover'],
  min: 0,
  max: 100,
  palette: ['bbe029', '0a9501', '074b03']


Map.addLayer(dataset, visualization, 'Percent Tree Cover');

var image = dataset.first();

// Extracting values 
var sampled_points = image.sampleRegions({ 
  collection: points, 
  scale: 30, // pixel resolution in meters 
  geometries: true // if ‘true’, the point coordinates will be added to the output

print(sampled_points, 'Percent_Tree_Cover');

// Drawing chart to download CSV values 
  features: sampled_points, 
  yProperties: ['Percent_Tree_Cover']

Map.centerObject(sampled_points, 3); 
Map.addLayer(sampled_points, {color: 'blue'}, 'sampled');

// Exporting features, specifying corresponding names 
"sampled_points", //my task
"GEE_Folder", //my export folder in Google Drive 
"vegetation_cover", //file name 

On the GEE Website (link above) it says, that the data has an availability from 2000-03-05T00:00:00Z – 2020-03-05T00:00:00.

How do I know from what sensing period within these 20 years my extraced data is and how can I define in the code, from what time period or year I want it to extract the pixel values at my points?

I need the most current I can get.

I am pretty new to GEE.

1 Answer 1


You can filter your entire MODIS image collection modifying the following line:

var dataset = ee.ImageCollection('MODIS/006/MOD44B')
                .filterDate('2000-03-05', '2000-10-05');

The ee.ImageCollection.filterDate function allows to filter the image collection by a date range.

Then you can print your MODIS image collection using:


and explore the properties of your images. One of these properties will contain the date of acquisition or date of composition. I believe in your collection it is in the date_range property, in UnixTime.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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