如何使用Google地球引擎中的Python导出结果

时间:2018-06-18 15:09:48

标签: python google-earth-engine

我正在尝试将JavaScript地球引擎代码翻译为Python。我下面代码的最后一行尝试将结果输出导出到我的Google云端硬盘,但无济于事。代码似乎在我的Linux虚拟机上运行。

... some processing ...

# Export CSV file
ee.batch.Export.table.toDrive(collection=AOI, folder='data_earth_engine', description='lossyear', fileFormat='CSV', selectors=props)
  • 你有什么建议可以让它发挥作用吗? 我是否需要显式启动使用此代码创建的任务,类似于JavaScript代码界面中的操作?怎么做?

1 个答案:

答案 0 :(得分:1)

这对我有用。它启动了任务并将结果保存在我的Google云端硬盘上。

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)