I am trying to filter a MODIS image collection by country. I have seen a lot of examples where you can map the image collection over a function and clip to the country, but I was trying to simplify the code by filtering my image collection by the country geometry (.filterBounds) instead. I know I need to feed in a geometry to do this, so I tried to convert my country feature to a geometry, and then filter by .filterBounds. It does not return an error, but also does not filter to my country shape.
If there is not a way to get this to work, why is creating a function to clip an image better?
var canadaShape = ee.FeatureCollection('USDOS/LSIB_SIMPLE/2017').filter(ee.Filter.eq('country_na', 'Canada')); var geometry = CanadaShape.geometry(); Map.addLayer(geometry); var terraCollection = ee.ImageCollection("MODIS/006/MOD10A1").select(['NDSI_Snow_Cover']).filterBounds(geometry).filter(ee.Filter.date('2019-11-01', '2020-05-01')); Map.addLayer(terraCollection);