#importar earth engine, autenticar e iniciar sesion import ee ee.Authenticate() ee.Initialize() #cargar dem dem = ee.Image('USGS/SRTMGL1_003') #cargar WCMC/WDPA/current/polygons wcmc = ee.FeatureCollection('WCMC/WDPA/current/polygons') #filtrar por de Salinas y Aguada Blanca wcmc = wcmc.filter(ee.Filter.eq('NAME', 'de Salinas y Aguada Blanca')) #recortar dem dem = dem.clip(wcmc) #exportar al google drive batch task = ee.batch.Export.image.toDrive( image = dem, description = 'dem_salinas', folder = 'gee_prueba', fileNamePrefix = 'dem_salinas', region = wcmc.geometry(), scale = 30, crs = 'EPSG:4326', maxPixels = 1e13 ) task.start() #verificar si se exporto task.status() #importar time import time #while con task es diferente de completado y diferente de failed while task.status()['state'] != 'COMPLETED': print('Task state: ' + task.status()['state']) time.sleep(5)