This PR expands the functionality of the export_image function to allow images to be exported to Google Drive using the Earth Engine function call ee.Batch.Export.image.toDrive. Previous functionality is unchanged and default behavior should match what the function was doing prior to these changes. This PR aims to close #24.
Key changes:
asset_id is now an optional key-word argument as it is not needed for exporting to Drive
export_type is an optional key-word argument that defaults to 'toAsset' which reproduces old functionality, but can be specified as 'toDrive' in which case the ee.Batch.Export.image.toDrive function is used
folder is an optional key-word argument that can be used to specify the Drive folder to export the image to
Creation of test_geeutils.py file to add some unit tests which ensure errors are raised and the different export functions are called as expected
Sorry this has taken me awhile to get to! This all looks good, I haven't seen the unittest.mock.MagicMock() before so looking forward to digging deeper and seeing how it works.
This PR expands the functionality of the
export_image
function to allow images to be exported to Google Drive using the Earth Engine function callee.Batch.Export.image.toDrive
. Previous functionality is unchanged and default behavior should match what the function was doing prior to these changes. This PR aims to close #24.Key changes:
asset_id
is now an optional key-word argument as it is not needed for exporting to Driveexport_type
is an optional key-word argument that defaults to 'toAsset' which reproduces old functionality, but can be specified as 'toDrive' in which case theee.Batch.Export.image.toDrive
function is usedfolder
is an optional key-word argument that can be used to specify the Drive folder to export the image totest_geeutils.py
file to add some unit tests which ensure errors are raised and the different export functions are called as expected