setProperties#
- geetools.ee_asset.Asset.setProperties(**kwargs)#
Set properties of the asset.
- Parameters:
**kwargs – The properties to set key, value pairs. To name normal properties simply use the name as key. For system properties, prefix it with “system:”. Note that only the “time_start” and “time_end” are editable.
- Return type:
ee.Asset
Warning
GEE is not accepting any data type for the
time_startandtime_endproperties. TO simplify usage this method will be acceptingdatetime.datetime,datetime.date,int(in milliseconds) andstr(in ISO format with a “Z” at the end). If any other type is used, it will be converted to a string (and will most likely fail in GEE).Examples
# dates need to be set in milliseconds start = dt.datetime(2021, 1, 1).timestamp() * 1000 asset = ee.Asset("projects/ee-geetools/assets/folder/image") asset.setProperties(**{"description": "new_description", "system:time_start": start})