cws-ee-asset-uploader
v0.0.3
Published
Helper library for uploading assets to Earth Engine. Wraps gsutil and earthengine command line utilities.
Readme
cws-ee-asset-uploader
Helper library for uploading assets to Earth Engine. Wraps gsutil and earthengine command line utilities.
Requirements
Unfortunately there is a bit of setup to run this tool. Here are the requirements:
- NodeJS
- Earth Engine Command Line Tool
- Command line tool is provided with the Python library
- gsutil
Install
npm install -g cws-ee-asset-uploaderSetup
In order to upload files you will need to authenticate with both earthengine and gsutil command line tools. It is recommended you login with the same account to both.
Earth Engine Command Line Tool - Authentication
# this will open your browser, have you login then paste a code into the terminal
earthengine authenticategsutil - Authentication
# this will open your browser, have you login then paste a code into the terminal
gcloud initYou only need to authenticate once, not every time you use the cws-ee-asset-uploader. Unless you want to switch accounts.
Finally, create a stagging bucket:
gsutil mb -c coldline gs://cws-my-test-bucketUsage
Help
> cws-ee-asset-uploader --help
Usage: cws-ee-asset-uploader cws-ee-asset-uploader [Earth Engine Path] <File...>
Options:
-h, --help output usage information
-V, --version output the version number
-y, --yes Do not prompt for approval before uploading
-r, --rm Allow overwriting of existing Earth Engine filesUpload
First, make sure the Earth Engine folder exists
earthengine create folder users/ucd-cws-ee-data/uploading-testingThen upload asset(s)
cws-ee-asset-uploader gs://cws-my-test-bucket users/ucd-cws-ee-data/uploading-testing et24_03212015_P44R33_L8_BD.tifor
cws-ee-asset-uploader gs://cws-my-test-bucket users/ucd-cws-ee-data/uploading-testing *.tif