davemlz / eemont

A python package that extends Google Earth Engine.
https://eemont.readthedocs.io/
MIT License
407 stars 69 forks source link

Incomplete exports #84

Open kwazineutin opened 3 months ago

kwazineutin commented 3 months ago

I tried to calculate a set of indices. I selected the bands/indices to export by looping through a list using the same scale, region, and other export parameters

For some indices, I get the full coverage at the desired scale, but for others, I do not get the full coverage. After reducing the scale from 10 m to 20 m, I get the full coverage for the indices that failed in the first run. However, my desire is to have the exports at 10 m with full coverage in all cases. the error from the export task is "Internal error"

Code

estbound = countries.filter(ee.Filter.eq('country_na', 'Estonia'))

est_coord = estbound.geometry().bounds().getInfo()['coordinates']

est_buf = ee.Geometry.Polygon(est_coord).buffer(5000)

S2 = (ee.ImageCollection("COPERNICUS/S2_SR_HARMONIZED") .filterDate(start_date, end_date) .filterBounds(est_buf) .filterMetadata('CLOUDY_PIXEL_PERCENTAGE','less_than',20) .map(maskS2clouds) ) spectral = ["NDVI","NDWI","EVI","LSWI","DSI","GEMI","NDDI","NMDI","SAVI","PISI","EBBI","UI","NDBI","BI"] S2_inds =S2.spectralIndices(spectral) S2_inds_comp= S2_inds.median()

for index in spectral :

task_f5 = ee.batch.Export.image.toCloudStorage( image=S2_indscomp.select(index), description=('f5'+index), #check bucket='breeze', fileNamePrefix=('f5_'+index+'/f5s2'+index+'/f5s2'+index),#check fileFormat='GeoTIFF', scale=10, crs='EPSG:4326', maxPixels= 1e13, region= est_buf.geometry().bounds(), formatOptions={ 'cloudOptimized': True } ) task_f5.start() task_f5.status()

Error

{'state': 'FAILED', 'description': 'est_s2_GEMI', 'creation_timestamp_ms': 1715190208033, 'update_timestamp_ms': 1715229122961, 'start_timestamp_ms': 1715220367648, 'task_type': 'EXPORT_IMAGE', 'attempt': 5, 'error_message': 'Internal error.', 'id': '2RZVXS2VOBN7ELZEXAMN36B7', 'name': 'projects/earthengine-legacy/operations/2RZVXS2VOBN7ELZEXAMN36B7'}

Setup (please complete the following information):