pythongoogle-earth-engine

How to export results using Python in Google Earth Engine


I am trying to translate a JavaScript earth engine code to Python. The last line of my code below attempts to export result outputs to my Google Drive but with no avail. The code seems to run through on my Linux virtual machine though.

... some processing ...

# Export CSV file
ee.batch.Export.table.toDrive(collection=AOI, folder='data_earth_engine', description='lossyear', fileFormat='CSV', selectors=props)

Solution

  • This worked for me. It started the task and saved the results on my Google Drive.

    mytask = ee.batch.Export.table.toDrive(collection=AOI, folder='data_earth_engine', description='lossyear', fileFormat='CSV', selectors=props)
    
    ee.batch.data.startProcessing(mytask.id, mytask.config)