Tutorial 7: Google Earth Engine

WUR Geoscripting WUR logo

Week 2, Tutorial 7: Google Earth Engine

Good morning! Today we will start working with Google Earth Engine. If you do not have an active account yet, register an account now!. Hopefully it will be activated soon. If it doesn’t work out, ask someone to share a repository with you, and then accept it from your email address, that should grant you an account instantly.

Learning objectives

We will check out Google’s Earth Engine. First what it is, but most importantly what we can do with it.

Google Earth Engine

You might wonder why Google chose the same name as their other Google Earth. It’s no coincidence. Google Earth Engine is less of a name, and more of a description. It represents the collection of tools that were built to develop and ultimately power Google Earth. Google Earth Engine is Google’s Earth Engine, but also Google Earth’s engine.

On top of the “Engine”, GEE has 2 interfaces for users, through its Javascript and Python API. Even though they serve 2 different programming languages, they are almost interchangeable. The only major difference between the 2 is that Google built a nice IDE webapp, called the Code Editor, which can be used to interact with GEE, but only using Javascript. This is the most beginner friendly way to interact with Google Earth Engine, so that’s what we’ll focus on as well. If you are confident in your skills, feel free to explore interacting with GEE through Python as well.

If you want to know more about what is Google Earth Engine, please read the paper straight from the horse’s mouth. For those of you more inclined towards dramatic arts, feel free to watch (later!) the recent Netflix’ take on it as well.

Lastly, Google Earth Engine contains almost everything you could wish in terms of easy access to free satellite data through its [Earth Engine Data Catalog] (https://developers.google.com/earth-engine/datasets/catalog)

Let’s get our hands dirty

Google already developed free and comprehensive guides for its Earth Engine, so we’ll make extensive use of those. Although ideally you would go through all their tutorials to become an expert, we believe the following are enough to get you to the necessary level for today’s evening exercise and to self-develop afterwards.

Follow only the first 2 tutorials (linked below) on the Tutorials page. To properly go through these tutorials, try to understand the code. There will probably still be some confusing lines of code left, but that’s fine as long as you gave it a try. Learning is a process, not a task. Please note that each tutorial is comprised of multiple sections, so you’ll have to click on the next section link at the bottom of the Introduction pages of the 2 tutorials linked below.

  1. Introduction to JavaScript for Earth Engine (3 sections, the links are at the bottom of each section)
  • If you have troubles following this tutorial, only READ the Javascript Quickstart Guide
  • Feel free to copy-paste some of the guide code examples in the code-editor, but please remember that you don’t need yet to perfectly understand each shown line of code.
  1. Introduction to the Earth Engine JavaScript API (7 sections)

If you run into trouble, either with the above tutorials, or the exercise, skim through the following guides. The answer is likely to be in there.

  1. Coding Best Practices specific to Google Earth Engine
  2. Debugging Google Earth Engine code

Only if you still have time, the Concepts Guide might be useful to understand why is Google Earth Engine so awkwardly different from anything else you programmed so far.

Enjoy your lunch! (If this message takes you by surprise, click here)

References and more info

  • Most of the information on Google Earth Engine in this tutorial comes directly from Google and from universities, which developed tutorials for students to work with Google Earth Engine.

  • You might be interested in looking at the Earth Engine developers forum.