Introduction to Google Earth Engine
Google Earth Engine recently launched a new home page at earthengine.google.com, and updated other features. Most of the elements in this tutorial are still relevant. The Data Catalog is now at: explorer.earthengine.google.com/#index, and the Workspace is now at: explorer.earthengine.google.com/#workspace. This tutorial will be updated to reflect these changes soon.
Google Earth Engine is a planetary-scale platform for environmental data analysis. It brings together over 40 years of historical and current global satellite imagery, and provides the tools and computational power necessary to analyze and mine that vast data warehouse. Current applications include: detecting deforestation, classifying land cover and land cover change, estimating forest biomass and carbon, and mapping the world’s roadless areas.
This tutorial will introduce you to Google Earth Engine and its basic functionality, including exploring the Data Catalog and viewing datasets in the Workspace.
Let’s explore the Home page and find out a bit of what Earth Engine can do.
- Open your browser and go to http://earthengine.google.org. You will see the page below.
At the top of the page is a search bar, where you can search for places or datasets. For example, entering “Landsat” brings up datasets with Landsat in their name, description, or tags, while entering “Brazil” brings up locations with Brazil in their name. In the top right, there is a Sign in button, where Earth Engine partners can sign in.
The introductory text on the Home page gives an overview of Earth Engine as “a planetary-scale platform for environmental data and analysis.” It also provides links to product videos, news items, and other resources.
Below the introductory text is the Featured gallery, where you can quickly find examples of some of the best and latest analysis products produced by Google Earth Engine and the organizations using it. These include links to view massive datasets using the Google Earth plugin (available for Windows and Mac).
- Click on Global Roadless Areas: 1 km buffer to see the map shown below.
- Explore the map by panning and zooming Google Earth. You can use the controls in
the upper right, or use your mouse to pan, and your mouse’s scroll wheel to zoom.
Note: If you don’t have the Google Earth browser plugin installed, you can get it here.
- When you have finished exploring, click the blue Done button to return to the home page.
Other links in the Featured gallery will display timelapses of environmental change on massive scales. For most of the timelapses, clicking the link will show you an introductory video, like the one for the Drying of the Aral Sea shown below.
To explore the timelapse map, click the “Explore Map” button indicated above and you’ll see the zoomable, timelapse map shown below. On the timelapse maps, you can zoom in, pan the map, pause the timelapse, and select the playback speed, as indicated below.
- When you have finished exploring, click the blue Done button to return to the home page.
The Data Catalog lists the datasets available for viewing and analysis in Google Earth Engine.
- Click on the Data Catalog button in the upper right of any Google Earth Engine page.
On the Data Catalog page you will see a list of Popular Tags, linking to datasets that have those tags applied. Below that is a list of various datatypes and multi-day mosaics, including brief descriptions of, and direct links to, a handful of the available datasets. These lists show or link to most of the datasets and mosaics available in Google Earth Engine. To access ALL available datasets, use the search bar at the top of the page.
- Click on a few of the popular tags to see what kinds of datasets they contain.
- On the Data Catalog page, click on the 32-day tag to bring up all the 32 day mosaics.
- Select the Landsat 5 32-Day NDVI Composite to open its detail page, shown below.
This page shows details about the selected dataset, including its name, a brief description, a sample image, and information such as which dates are available (Landsat 5 stopped sending data at the end of 2011; use Landsat 7 or MODIS data for more recent imagery), the provider’s name, and any tags for that dataset. There is also a blue Open in workspace button which can be used to add the dataset to your current workspace (more on that below).
- Return to the Data Catalog page by clicking your browser Back button twice, or by clicking the Data Catalog button in the upper right.
The Workspace is where you manage, analyze, and visualize datasets in Google Earth Engine.
- Click on the Workspace button in the upper right of any Google Earth Engine page.
On the Workspace page, you will see a map on the right, and space for a list of data layers on the left. Unless you have already added a dataset to your workspace, your Data list will be empty, and the map will show the Google Maps terrain layer, as shown above.
As a reminder for navigating the Google Maps interface, here are some basics. You can move (pan) around the map by clicking and dragging anywhere on the map. To zoom in and out there are several techniques. You can always use the [+] and [-] zoom buttons and the zoom slider on the map to zoom in and out. You can also double-click anywhere on the map to zoom in. If your pointing device (mouse or track pad) has a right button, you can double-right-click on the map to zoom out. If you have a touch-screen device, you may be able to zoom with a pinch gesture, and if you have a mouse with a scroll wheel, the easiest way to zoom is to simply turn the wheel. To change the map background use the buttons in the upper right of the map to select either Map view or Satellite view. When selecting Map view, a checkbox will appear below the Map button to turn on/off Terrain instead of the usual road-map view. When selecting Satellite, a checkbox will appear below the Satellite button allowing you to turn on/off the Labels (borders, countries, cities, water bodies, etc.).
Now let’s view some data in the Workspace...
Adding a dataset to the Workspace
- Click the Data Catalog button to return to the Data Catalog page.
- Click to select MCD43A4 BRDF-Adjusted Reflectance 16-Day L3 Global 500m (currently at the top of the list under “Surface reflectance”). This is a MODIS derived layer that shows the color of the land surface over each 16 day period.
- On the dataset details page, click the blue “Open in Workspace” button. This will bring you to the Workspace, with the dataset visible as a layer.
- Alternatively, you can skip the details page and open the layer in your workspace directly from the Data Catalog by clicking the “open in workspace” link next to the dataset name.
You will see that the dataset is listed (MCD43A4...) in the Data layer list in the left-hand panel, and that the data is visible on the map.
- Pan and zoom the map to get a view of North America, something like what’s shown below, where you can see the brown desert and mountain regions, and the greener coasts and midwest.
- Toggle off the visibility of the data layer by clicking the visibility button (eye icon) to the left of the data layer name (see below). You will see the Google Maps Terrain view revealed.
- Click the visibility button (eye icon) again to make the data layer visible on the map again.
- Zoom as far as possible on a location of your choice to see the maximum resolution of the dataset. The MODIS data we’re using in this example has only moderate resolution (each pixel is 500 meters on a side). The Great Salt Lake and San Francisco Bay are good examples which are easy to find, and show a variety of colors.
- When you are ready, zoom back out to a view of the United States.
Note that some datasets can only be shown at certain zoom levels, and not at others. For example, if you are zoomed all the way out to a global view and try to see a Landsat 7 dataset, it will not be visible on the map. Don’t worry, it’s not broken! A yellow bar appears at the top of the map saying that you need to zoom in to view the data.
Adjusting the layer settings
Now we’ll adjust some settings to explore the data in more detail.
- Click on the Data layer name in the left-hand panel to bring up the Layer Settings, as shown below.
The Layer Settings allow you to customize a variety of parameters, including the date(s) for which data is shown.
- Look at the time slider and find the date range listed just below it. Note that the dates shown are the most recent 16 day period available. At the time of this writing, it listed “Jul 19, 2012 - Jul 26, 2012.” This means that the data on the map is a visualization of these 16 days worth of BRDF-adjusted surface reflectance data (in this case, just 3 of the many bands).
- Change the time setting by dragging the time slider towards the left, and watch the data on the map change. If you drag the slider to an opposite season (eg: Summer to Winter), you will see more obvious changes.
- The time slider indicates which time period you have selected, and the orange highlight on the slider bar indicates which date range is currently visible on the map (it sometimes takes a moment to catch up with the slider).
- To go farther back in time, or to select a specific date range, click on the Jump to date link below the time slider and use the calendar interface to select a date.
- When you have selected the date range you wish to show, click the Save button to save the Layer Settings. If you wish to return to your previous settings, click the Cancel button instead.
Note: For “Classified Raster” type data layers, the settings required are different. See the Viewing Classified Rasters section below.
Adding more layers
You can view multiple data layers on your map at once by adding additional datasets.
There are several ways to add additional data layers in your Workspace. The first method is to return to the Data catalog, select another dataset, and use its Open in Workspace button. This will add the dataset to your workspace, as a layer above your current data layer(s). Note that the new layer will show on top of the previous layers on your map. See below for changing the order of the layers.
Another way to add additional datasets is directly from the search bar your Workspace. To start searching for a dataset to add, do one of the options below:
- Click in the Search bar
- Click the “+” button at the top right of your data layer list, or
- Click the Add data link at the bottom of your data layer list.
All three of these options will allow you to type your query in the Search bar, and select a dataset to add as a layer.
When you add a new layer to your Workspace, “Raster” type datasets will come in as a simple layer, but “Classified Raster” type datasets require a bit of set up before you can view them (see the Viewing Classified Rasters section below). The screenshot below shows both types of datasets as results for the search “m”.
You can also add the same dataset twice, as two separate layers in your Workspace. One reason to do this would be to view two different time slices of the same dataset, to view change over time. For more on this, see the “Visualizing change over time” section below.
When you have more than one dataset visible on your map, the one listed at the top of the Data layers list will be drawn on top of those below it. To change the ordering, use your mouse to click on the drag point to the left of the dataset name in the list, and drag it up or down in the list.
Removing a layer from the Workspace
If you wish to remove a data layer from your Workspace...
- Click on the data layer name in the Data list to bring up the Layer Settings dialog.
- Click the Delete button and the layer will be removed from your Data list and from the map.
- Note: If you want to turn off the layer to remove it from the map, but leave it in the Data list, click the visibility button (eye icon) next to the Data layer name.
Now that you know the basics, let’s explore a few of the more powerful things you can do in the Google Earth Engine workspace. In the sections below we’ll show you how to setting up and view classified rasters, adjust a layer’s visualization parameters, and visualize change over time.
Advanced - Viewing Classified Rasters
Classified Raster type data layers require a little more setup in order to view them. You will need to select the year to show, and set up classes with names and colors to represent each class. For example, the MCD12Q1 classified rasters represent 5 different systems for classifying land cover type. Each of these datasets is annual (ranging from 2001 to 2009), and divides the Earth into different land cover classes. More information about each of these classification systems may be found on the USGS Distributed Archive site.
Let’s set up a Classified Raster data layer...
Add a classified Raster
- Search for “MCD” and see under the Classified Rasters results section, there are several datasets listed.
- Select any one of them to add to your workspace. We’ll use MCD12Q1-1 IGBP for this example.
- When the layer is added to your workspace, the Layer Settings dialog should open automatically. If not, click on the layer name to open it.
Select a year to display
- In the Layer Settings dialog, select a year from the Year: dropdown.
Add classes to display
When you add the classified raster, a Classes section appeared in the left-hand panel. You can use this to add classes and assign them colors and names, or you can do it in the Layer Settings dialog for the classified raster layer. These two techniques are described in the instructions and image below.
- Use the Layer Settings dialog to add classes.
- Click on the name of the Classified Raster layer in your Data layers list, to open its Layer Settings dialog.
- In the Layer Settings, click the pulldown menu next to one of the listed classes, for example “Water”, and choosing Add new class.
- The new class will appear in the Classes section of your left hand panel.
- Set the color of the class by clicking on the color square next to it.
- Set the name of the class by clicking on the text next to it.
- Repeat for the other classes in the classified raster.
- Use the Classes area in your left hand panel to add classes.
- Click on the Add class link, or the “+” symbol to add a new class.
- Set the color of the class by clicking on the color square next to it.
- Set the name of the class by clicking on the text next to it.
- Click on the classified raster layer’s name to open the Layer Settings dialog.
- Assign the classes you created to the classes in the raster using the dropdowns next to each class name.
Classes that have not been assigned colors will not appear on the image. Classes may be removed from the image by clicking the X that appears next to a Class when you move your mouse over the class name.
Once you add classes to your workspace for each of the classes in the raster dataset, it will look something like this:
Advanced - Setting Visualization Parameters
In the Layer Settings dialog for most data layers, you will see a “Visualization Parameters” link. Click on it to reveal a number of advanced visualization settings. Each dataset has different default values, which are shown when you first click the link, but you can modify them to change how you visualize the dataset.
Min, Max, Gain, Bias and Gamma
The first row of parameters are Min, Max, Gain, Bias, and Gamma. These parameters let you modify how data values are visualized. You may either set Min and Max, or you may set Gain and/or Bias.
Min and Max
Min represents the value to represent as decimal value 0 and Max represents the value to represent as decimal value 255. The values below Min will also be drawn with value 0, and the values above Max will also be drawn with value 255. Values between Min and Max will be scaled linearly, so that the middle of the range will be assigned value 122.
For example, the Shuttle Radar Topography Mission (SRTM) dataset contains values that represent elevation in meters, from -425 m to 8806 m. To visualize the dataset with a good detail in most parts of the world, you might want to represent 0 meters as black and represent 3000 meters and above as white, so set the Min to 0 and Max to 3000. To pick out mountains, or better see variation in high elevation areas above 3000 meters, you can set the Min to 3000 and the Max to 8806.
The image below shows the SRTM dataset with Min = 0 and Max = 3000, showing Puget Sound and highlighting Mount Rainier (4,392 m tall) as the white spot.
Gain and Bias
An alternative way to alter how the values in a dataset map onto visualization values is the change the gain and bias. Each value is multiplied by the gain, and increased by the bias. For example, the SRTM values, which range between -415.0 and 8806 can be compressed to between 0 and 255 by multiplying by 0.02765 (set the gain to 0.02765). adding 11.47 (set the bias to 11.47).
Gamma represents the relationship between a value and the luminance used to represent it. Roughly speaking, increasing gamma increases the intensity of values in the middle of the visualization range.
Bands (R, G, B)
When you see an image on the web, you are generally seeing a combination of red, green, and blue pixels (RGB). In Earth Engine, these are separated into “bands”: the red band contains the red values for each pixel, the blue band contains the blue values for each pixel, and the green band contains the green values for each pixel. These bands are then combined to form the image you see on the screen.
Many Earth Engine datasets include more than three bands. For example, Landsat 7 images have 8 bands. Three bands roughly match red, green, and blue, and others represent infrared light, or thermal energy. Each band has a name. In the case of Landsat, the blue band is named 10, the green band is named 20, and the red band is named 30. To see an image that looks like how we typically see the aerial imagery, Earth Engine maps bands 30, 20, 10 onto R,G, B, respectively.
However, mapping different bands onto R, G, and B can create some interesting and useful effects. For example, mapping bands 40, 30, and 20 onto R, G, and B creates a “false color” image in which vegetation is highlighted and displayed in red.
The Bands input field provides a place where you can tell Earth Engine which bands of a dataset you would like to represent as red, green, and blue. To do this, list the band names in the RGB order, separated by commas. For example, to see a false color image, type 40, 30, 20 into the Bands (R, G, B) input field, as shown below:
A palette allows you to assign colors to the range of values in a dataset. A palette is a series of comma separated hexidecimal color values. Providing two values sets the color of the lowest value and highest value of the dataset. For example the SRTM digital elevation model is displayed in shades of gray by default. To display it in shades of red instead, where the lowest elevation points are black, and the highest elevation points are dark red, enter 000000,FF0000 into the palette box (it looks better if you set Min to 0 and Max to 3000). FF0000 is the hexidecimal value that is high (FF) on red and low (00) on green and blue. The 000000 value is low on red, green, and blue. To make the low elevations white instead, use the palette FFFFFF,FF0000.
Adding an additional color values to the palette will divide the color range into two areas: beginning to midpoint, and midpoint to end. The colors in these ranges will be scaled from the beginning of each range to its end. Adding more colors will increase the number of color ranges. Try visualizing SRTM with the palette FFFFFF,00FF00,FF0000. To see a complicated palette, open an NDVI dataset (type NDVI into the search field) and open its Visualization Parameters. The image below shows NDVI around Sacramento, California.
Advanced - Visualizing change over time
One of the interesting things you can do in Google Earth Engine is to visualize changes over time. To do this, you will need to add the same dataset to your Workspace as two separate layers, but set them to show different time slices. The example below will show you how to visualize the rapid urban expansion of Las Vegas, Nevada.
- Go to your Workspace, search for “Las Vegas, NV”, and zoom to it.
- Remove (or turn off) all the layers from your Data list.
- Add the “Landsat 5 Annual TOA Reflectance Composite” dataset to your workspace.
- Now, add it again, as a second, identical layer.
- Using the Layer Settings, set the top one to 2011, and the bottom one to 1987.
- Toggle the visibility of the top layer on and off, and will let you see the growth of the city over those 14 years.
Things to look out for
There are a number of things to look out for and be aware of as you explore the data in Google Earth Engine, some related to the way Earth Engine works, and some implicit in the datasets. Below are some of the more common things you may run into.
- Landsat imagery cannot be viewed globally; you must zoom in a few levels. If the image isn’t appearing on the map, look for the yellow bar at the top of the page indicating that you need to zoom in.
- Each dataset comes from a satellite that functions (or functioned) over a specific time frame. Landsat 5, for example, stopped sending data in November, 2011. The Landsat 7 and MODIS satellites are still functioning.
- Different satellites visit the same spot on the Earth with different frequency. MODIS imagery covers the entire globe every day. Landsat only visits the same spot every 16 days, but in return it provides higher resolution. In addition, there are spots on the Earth that are missing data for some satellites. Landsat 5 data is missing in many places.
- Missing data is rendered as transparent - you can see through to the Google Maps basemap.
- Some places are cloudy all the time, and accordingly have no clear imagery. Certain datasets will show these areas as having missing data.
- Landsat 7 had a partial failure of its imaging system on May 31, 2003, which results in long stripes of missing data in every Landsat 7 scene taken since then, as visible in the image below. These can be corrected for by using a Landsat Composite dataset which combines multiple scenes over time and therefore can fill in the missing gaps.
Google Earth Engine has more advanced features such as classifying land cover, downloading datasets, and the ability to build your own data analysis algorithms. To start using these advanced features of Earth Engine, sign up at earthengine.google.com/signup.
Feedback for us?
If you have any feedback on the functionality or user interface, please let us know, so that we can be sure to take it into account as we continue to develop and improve Google Earth Engine. The best way to provide us feedback is through the Send Feedback link in the upper right of every Earth Engine page.