geetools.Asset.Asset.copy#

geetools.Asset.Asset.copy(new_asset, overwrite=False)#

Copy the asset to a target destination.

Copy this asset (any type) to the given target, and return a new Asset instance pointing to target. If target exists and overwrite is False the method will raise an error. Else it will silently delete the existing asset. If the asset is a folder the whole content will be moved as well.

Parameters:
  • new_asset (Asset) – The destination asset.

  • overwrite (bool) – If True, overwrite the destination asset if it exists. Defaults to False.

Returns:

The new asset instance.

Return type:

Asset

Examples

asset = ee.Asset("projects/ee-geetools/assets/folder/image")
new_asset = ee.Asset("projects/ee-geetools/assets/folder/new_image")
asset.copy(new_asset, overwrite=False)