How to export results using Python in Google Earth Engine

Question:

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)
  • Would you have some suggestion in order to make it work?
    Do I need to explicitly start the task created with this piece of code, similarly to what is done in the JavaScript code interface? How is it done?
Asked By: Pierric

||

Answers:

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)
Answered By: Pierric
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.