eemont.imagecollection.closest¶
- eemont.imagecollection.closest(self, date, tolerance=1, unit='month')[source]¶
Gets the closest image (or set of images if the collection intersects a region that requires multiple scenes) to the specified date.
Tip
Check more info about getting the closest image to a specific date in the User Guide.
- Parameters
self (ee.ImageCollection [this]) – Image Collection from which to get the closest image to the specified date.
date (ee.Date | string) – Date of interest. The method will look for images closest to this date.
tolerance (float, default = 1) – Filter the collection to [date - tolerance, date + tolerance) before searching the closest image. This speeds up the searching process for collections with a high temporal resolution.
unit (string, default = 'month') – Units for tolerance. Available units: ‘year’, ‘month’, ‘week’, ‘day’, ‘hour’, ‘minute’ or ‘second’.
- Returns
Closest images to the specified date.
- Return type
ee.ImageCollection
Examples
>>> import ee, eemont >>> ee.Initialize() >>> S2 = ee.ImageCollection('COPERNICUS/S2_SR').closest('2020-10-15')