Batch uploading assets to the GEE

More convenient than uploading your geospatial files one by one.

This is a small tutorial that explains how to upload your own geospatial data to the Google Earth Engine. I assume you have installed the python API as explained here. The upload tool comes with the GEE asset manager which you can download from github.

Step 1: Make sure Git is install on your machine.

sudo apt-get install git

Step 2: Clone the GEE asset manager to your machine

git clone https://github.com/tracek/gee_asset_manager.git

Step 3: Go into the gee_asset_manager folder and install the application

File "build/bdist.linux-x86_64/egg/retrying.py", line 47, in wrap
AttributeError: 'module' object has no attribute 'wraps'

So downgraded retrying to make the tool work

sudo -H pip install retrying==1.2.3

Step 6: The line below gives you all options to upload all files from a directory:

geebam upload -h
usage: geebam upload [-h] -u USER -d DIRECTORY [-m METADATA] [-c COLLECTION]
[-p PATH] [--large] [--nodata NODATA]
optional arguments:
-h, --help show this help message and exit
Required named arguments.:
-u USER, --user USER Google account name (gmail address).
-d DIRECTORY, --directory DIRECTORY
Path to the directory with images.
Optional named arguments:
-m METADATA, --metadata METADATA
Path to CSV with metadata.
-c COLLECTION, --collection COLLECTION
Name with path of the collection to create. If not
provided, directory name will be used. It assumes the
upload goes to the user folder. Need upload to a
shared directory? Use --path instead. They are mutuall
exclusive
-p PATH, --path PATH Absolute upload path. It does not take any assumptions
about user folder, so it can be used to upload to a
shared folder. Mutually exclusive with --collection.
--large (Advanced) Use multipart upload. Might help if upload
of large files is failing on some systems. Might cause
other issues.
--nodata NODATA The value to burn into the raster as NoData (missing
data)