Skip to content

Latest commit

 

History

History
79 lines (44 loc) · 2.47 KB

README.md

File metadata and controls

79 lines (44 loc) · 2.47 KB

Introduction

Atmospheric correction of Sentinel 2 imagery in Google Earth Engine using Py6S.

Installation

Recommended: Docker

The following docker container has all dependencies to run the code in this repository

docker pull samsammurphy/ee-python3-jupyter-atmcorr:v1.2

You can also build a docker container from scratch using this Dockerfile from the gee-community repo.

Alternative: Manual installation

This repo has the following prerequisites

Usage

To run the docker container with access to a web browser

$ docker run -i -t -p 8888:8888 samsammurphy/ee-python3-jupyter-atmcorr:v1.2

Once inside the container, authenticate Earth Engine

earthengine authenticate

then grab the source code for this repo

git clone https://github.com/samsammurphy/gee-atmcorr-S2

and run the example jupyter notebook

cd gee-atmcorr-S2/jupyer_notebooks/
jupyter-notebook sentinel2_atmospheric_correction.ipynb --ip='*' --port=8888 --allow-root

this will print out a URL that you can copy/paste into your web browser to run the code.

If the URL is http://(something_in_parentheses) then you will need to change the parentheses and its contents for localhost. A valid URL should look something like..

http://localhost:8888/?token=...

Saving authentication

After authenticating with earthengine and cloning the repository you can save the changes you've made to the container with docker commit. Docker commit will create a new image from a running containers current state.

With the container still running, open a new terminal to get the container's ID:

docker ps

copy the ID to clipboard and run

docker commit [ID] gee-atmcorr-s2:myauth

to commit the image. Now if you run

docker images

your newly committed image should be at the top of the list.

You can now start the note book with

docker run -i -t -p 8888:8888 gee-atmcorr-s2:myauth 

jupyter-notebook /gee-atmcorr-S2/jupyer_notebooks/sentinel2_atmospheric_correction.ipynb --ip='*' --port=8888 --allow-root