项目作者: gee-community

项目描述 :
Command-line runner for Google Earth Engine Playground scripts
高级语言: JavaScript
项目地址: git://github.com/gee-community/ee-runner.git
创建时间: 2015-06-10T16:21:48Z
项目社区:https://github.com/gee-community/ee-runner

开源协议:Apache License 2.0

下载


ee-runner

Command line runner of Google Earth Engine Playground scripts using Node.js.

Gitter

Install or update globally and use as a script

  • npm install -g ee-runner@latest

  • Run Code Editor scripts as:

  1. > ee-runner <script-file> --project=<cloud-project-name>

or

  1. > ee <script-file> --project=<cloud-project-name>

Install as a package

  • npm install ee-runner
  • in your scripts, use:
  1. require("ee-runner")
  2. gee.initialize(function() {
  3. // ... your Google Earth Engine code comes here ...
  4. }, project)

Install as a command-line tool from GitHub

  • Clone this repository.
  • Inside Repository
    • Run: npm run init

Authenticate

If you don’t have Python version of Earth Engine installed - install it and run earthengine authenticate command.

Usage

  • node ee-runner.js <script-file> --project=<cloud-project-name>

Example

  • node ee-runner.js examples/hello.js --project=ee-runner-test
  1. First image in LANDSAT 8 TOA collection was aquired on 2013-09-26
  2. Downloading thumbnail ...
  • cat examples/hello.js
  1. var image = new ee.Image(new ee.ImageCollection('LANDSAT/LC08/C02/T1_TOA').first());
  2. var info = image.getInfo();
  3. var date = info.properties['DATE_ACQUIRED'];
  4. print('First image in LANDSAT 8 TOA collection was aquired on ' + date);
  5. print('Downloading thumbnail ...');
  6. var url = image
  7. .visualize({bands:['B6','B5','B3'], gamma: 1.5})
  8. .getThumbURL({dimensions:'1024x1024', format: 'jpg'});
  9. download(url, 'hello.jpg');
  • hello.jpg

hello.jpg

Roadmap