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?
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)
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?
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)