Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Google Earth Engine Tutorial Pt.

II
Clipping
Zachary Noah and J.B. Sharma, University of North Georgia
Objective:
This tutorial will teach how to clip a raster image to the extent of a vector polygon. The imagery
supplied by Google covers the entire planet so the imagery needs to be clipped in order to speed
up processing times as well to display only the imagery wanted.
Introduction:
GEE supports vector operations in addition to raster manipulation. A basic use of vector data in
GEE is for clipping rasters. The user can either clip to a raster created using heads up digitizing
in the GEE map interface, upload their own raster data, or clip to raster data provided by Google.
In this tutorial a polygon provided by Google will be clipped one personally created.
Start by using the same LANDSAT 8 raster data from the first tutorial.

Data that Google has already uploaded will be used to get the boundaries for Georgia, stored in
a format Google uses called a Fusion Table.
1. Search “United States Counties”, and select “United States Counties” under the tables
section. Rename the imported variable from ‘fusionTable’ to ‘counties’

2. Click on the arrow besides the counties variable to examine the column names of the
table. Note the data type of each column.

1
3. Click on the title of the Fusion Table in the import section in order to view the
information contained in the table.

4. Now view the Fusion table data on the map by using the Map.addLayer(); function with
the counties variable.

2
From these counties just the counties that are in Georgia need to be selected and placed in a new
variable.
5. Use the filterMetdata() on the counties variable to select the counties. While this fusion
table presents us with multiple options for selecting Georgia counties, in this case select
by FIPS code, using the ‘STATE num’ column. Make note that the ‘STATE num’ data
type is a number and not a string, so do not use quotes when pass the number as a
parameter.

3
6. Composite the landsat8 ImageCollection into a single image as shown in the first tutorial
and then clip it to the Georgia counties using the clip() function.
7. Now select the visualization tool from the layers dropdown to visualize the new image.

8. Repeat this activity with another U.S. State or geographic region of your choosing for
which a vector extent is available and produce a map composition.

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International


License.

4
5

You might also like