I am trying to select type 5 land cover from the MODIS 500m dataset for the year 2001, and then extract out the projection for that layer. However, my script doesn't seem to work because I still obtain a 'collection' when I am expecting an image (since there is 1 dataset per year and I am selecting a specific layer). I know it doesn't work because when i try to extract the projection using projection(), it gives me the error, 'modis.projection is not a function'. I know it works if i put .first for the image collection, but I want to apply this to 2005 as well (and understand where I went wrong).
Another thing I noticed is that the .clip function and .filterBound doesn't seem to work with MODIS (even when I use the .first function. Why is that so?
Thank you in advance.
// Script that doesn't work and gives the error var modis = ee.ImageCollection('MODIS/006/MCD12Q1') .filterDate('2001-01-01','2001-12-31') .select('LC_Type5') .clip(geometry); print('MODIS projection:', modis.projection());
// Script that works but doesn't end up clipping the image var modis = ee.ImageCollection('MODIS/006/MCD12Q1').select('LC_Type5') .first() .clip(cprBasin);