closestDate#
- geetools.ImageCollectionAccessor.closestDate()#
Fill masked pixels with the first valid pixel in the stack of images.
The method will for every image, fill all the pixels with the latest non masked pixel in the stack of images. It requires the image to have a valid
"system:time_start"property. As the imageCollection will need to be sorted limit the analysis to a reasonable number of image by filtering your data beforehand.- Returns:
An
ee.ImageCollectionwith all pixels unmasked in every image.- Return type:
Examples
import ee, geetools ee.Initialize() collection = ( ee.ImageCollection("LANDSAT/LC08/C01/T1_TOA") .filterBounds(ee.Geometry.Point(-122.262, 37.8719)) .filterDate("2014-01-01", "2014-12-31") ) filled = collection.geetools.fillWithFirst() print(filled.getInfo())