geetools.ImageAccessor.doyToDate#
- geetools.ImageAccessor.doyToDate(year, dateFormat='yyyyMMdd', band='')#
Convert the DOY band to a date band.
This method only work with date formats that can be converted to numbers as earthengine images don’t accept string bands.
- Parameters:
year – The year to use for the date
dateFormat (geetools.types.ee_str) – The date format to use for the date band
band (geetools.types.ee_str) – The band to use as DOY band. If empty, the first one is selected.
- Returns:
The original image with the DOY band converted to a date band.
- Return type:
ee.Image
Examples
import ee, geetools ee.Initialize() image = ee.Image.random().multiply(365).toInt() vatican = ee.Geometry.Point([12.4534, 41.9033]).buffer(1) image = image.geetools.doyToDate(2023) print(image.reduceRegion(ee.Reducer.min(), vatican, 1).getInfo())