Google Earth Engine – Filtering MODIS Data by Polygon

google-earth-enginemodispolygon

I tried to apply "filterBound" function to a MODIS image collection, using a polygon, but it doesn´t work.

This is my script :

var monte = ee.FeatureCollection("ft:1Sm4ObZgrKeCP-VlFa6Jf019-62oDS_AfqvqYw0t6"),

    MOD_W = ee.ImageCollection("MODIS/MOD13Q1");
var MOD = MOD_W.filterDate('2002-07-04', '2017-03-30');

var MOD_monte = MOD.filterBounds(monte);

Map.addLayer (MOD_monte);

When I use the same script for Landsat collection, it works.

How can I do for apply filterbounds to MODIS?

Best Answer

That is because the MODIS composite has a single raster that fills the whole planet, so filtering with bound doesn't make any difference. You may want to clip the image. Like this:

var monte = ee.FeatureCollection("ft:1Sm4ObZgrKeCP-VlFa6Jf019-62oDS_AfqvqYw0t6"),

    MOD_W = ee.ImageCollection("MODIS/MOD13Q1");
var MOD = MOD_W.filterDate('2002-07-04', '2017-03-30');

var MOD_monte = MOD.map(function(img) {return img.clip(monte)})

Map.addLayer(MOD_monte);
Map.centerObject(monte);

If you want to export it, you have to specify properly the region parameter.