GithubHelp home page GithubHelp logo

neilbrub / earthengine_imagery_downloader Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 35 KB

Find, filter, explore, export and download imagery from Google Earth Engine (https://earthengine.google.com/)

License: MIT License

Python 90.15% Jupyter Notebook 9.85%

earthengine_imagery_downloader's Introduction

Earth Engine Imagery Downloader

The code in this repository takes an object-oriented approach to retrieving, filtering, exploring, and exporting imagery from Google Earth Engine. Since the workflow to do this in a one-off sense (e.g. for a specific region, date range, collection, and set of filters) is fairly quick and simple to implement in the Earth Engine Code Editor, this codebase is designed to handle slightly more involved imagery acquisition needs.

Key use cases include:

  1. Configure (and save) multiple regions of interest, each with different image collections and filters
  2. Fetch imagery for multiple discrete date ranges at once (e.g. get imagery for same months over different seasons)
  3. Access various groups of filtered imagery simultaneously - e.g. retrieve HH/HV and VV SAR imagery at the same time, but give each a handle to interact with individually.

Nearly all functionality is defined in the eeImageryInterface class and associated utils.py.

Setup

  1. Install miniconda if not already installed

  2. Restore conda environment from environment.yml: conda env create -f environment.yml. Activate the conda environment.

  3. Install this code as a package: pip install -e . (include the '.')

  4. Initialize earthengine-api: run earthengine authenticate. Sign into the Google account whose Google Drive storage you would like to use for image exporting (see Workflow step 3).

Workflow

All code is in ./ee_imagery_downloader.

1. Configure Regions of Interest, Image Collections, and Image Filtering

Start with config/roi_configs.py and config/collection_filters.py.

2. Explore Configured Imagery in a GEE-Interfacing Notebook

See notebooks/browse_ee_imagery_example.ipynb.

Keep in mind that while some eeImageryInterface methods accept date ranges to return imagery for (e.g. a subset of images in a season for visualization), the imagery that has been filtered, loaded and made available to the client-side class instance is defined by the roi configuration.

3. Export Loaded Imagery to Google Drive

Exporting via Google Drive is necessary for files larger than 32MB. If your imagery is smaller than that, see Image.getDownloadURL.

Navigate to and run scripts/export_imagery.py. To see available arguments:

export_imagery.py --help

4. Download Exported Imagery Using the Drive API

Once imagery is exported to Google Drive, you could download it manually. However, if you have a lot of images, this sucks. Instead, you can try setting up & using a script that leverages the Google Drive API to do this automatically. It requires a few steps of Google-y setup, but once it works, it's pretty magical.

See scripts/download_drive_files.md.

earthengine_imagery_downloader's People

Contributors

neilbrub avatar

Stargazers

Yi Dong avatar

Watchers

 avatar

earthengine_imagery_downloader's Issues

Export Non-Mosaicked Tiles

Current export file-naming in utils.exportImageCollection uses an image basename + datetime string, which will be identical for different tiles of the same image. In a non-mosaicked export, these tiles will overwrite each other (or at least become non-identifiable).

Fix: include tile identifier in image naming where mosaic=False.

Until fix: export only supported with mosaic=True.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.