cws-ee-asset-uploader

0.0.3 • Public • Published

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:

Install

npm install -g cws-ee-asset-uploader

Setup

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 authenticate

gsutil - Authentication

# this will open your browser, have you login then paste a code into the terminal 
gcloud init

You 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-bucket

Usage

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 files

Upload

First, make sure the Earth Engine folder exists

earthengine create folder users/ucd-cws-ee-data/uploading-testing

Then upload asset(s)

cws-ee-asset-uploader gs://cws-my-test-bucket users/ucd-cws-ee-data/uploading-testing et24_03212015_P44R33_L8_BD.tif

or

cws-ee-asset-uploader gs://cws-my-test-bucket users/ucd-cws-ee-data/uploading-testing *.tif

Readme

Keywords

none

Package Sidebar

Install

npm i cws-ee-asset-uploader

Weekly Downloads

1

Version

0.0.3

License

ISC

Last publish

Collaborators

  • jrmerz