English 中文(简体)
Batch delet 谷歌地球发动机云层资产
原标题:Batch deleting Google Earth Engine cloud assets
  • 时间:2024-05-08 02:57:56
  •  标签:
  • libgee

In Google Earth Engine, there is no asset management interface, and assets can only be deleted one by one. How can I delete a batch of assets quickly?

问题回答
import ee

ee.Initialize()    
asset_list_path = { id :  projects/Your/assets }    
asset_list = ee.data.getList(asset_list_path)

print("Asset list:")
for asset in asset_list:
    print(asset[ id ])


#Define a list of assets to delete (indices 0 to 18).    
assets_to_delete = asset_list[0:19]

for asset in assets_to_delete:
    asset_path = asset[ id ]
    try:
        ee.data.deleteAsset(asset_path)
        print("Asset deleted:", asset_path)
    except Exception as e:
        print("Failed to delete asset:", asset_path)
        print("Error:", e)




相关问题
I can t get this GEE app to work when I publish it

I am very new to GEE. After the app is published, I access it through the link and get a flat map centered in the USA without any of the options programmed in the script. It s basically a study on 12 ...

热门标签