GEE 3622 Lab 3
GEE 3622 Lab 3
Prerequisites: Completing this lab exercise requires using the Google Chrome browser and a Google
Earth Engine account. If you have not yet signed up - please do so now in a new tab by opening the
following link:
https://code.earthengine.google.com/register
Once registered you can access the Earth Engine environment here: https://code.earthengine.google.com
Objective: The objective of this lab is to give you an introduction to the Google Earth Engine processing
environment. By the end of this exercise, you will be able to search, find and visualise a broad range of
remotely sensed datasets. We will start with single-band imagery - elevation data from the SRTM
mission.
• Browse through the information that was printed to the console. Open the "bands"
section to show the one band named "elevation". Note that all this same information is automatically
available for all variables in the Imports section.
• Use the Map.addLayer() method to add the image to the interactive map. We will start simple,
without using any of the optional parameters.
Map.addLayer(srtm);
The displayed map will look pretty flat grey, because the default visualization parameters map the full 16-
bit range of the data onto the black-white range, but the elevation range is much smaller than that in any
particular location. We'll fix it in a moment.
• Select the Inspector tab. Then click on a few points on the map to get a feel for the
elevation range in this area.
• Now you can set some more appropriate visualization parameters by adjusting the code as follows
(units are in meters above sea level):
Map.addLayer(srtm, {min: 1200, max: 1340});
Figure 5 SRTM with more appropriate min and max values
• You will now be able to see variation in elevation range with low values in black and highest points
in white. Layers added to the map will have default names like "Layer 1", "Layer 2", etc. To improve
the readability, we can give each layer a human-readable name, by adding a title with the syntax in
the following code. Don't forget to click run.
Map.addLayer(srtm, {min: 1200, max: 1340}, 'Elevation above sea level');
11. The next step is then to save you script by clicking "Save". It will be saved in
private repository, and will be accessible the next time you log in to Earth Engine.
12. If you would like to experiment with different colour combinations, you can play with
colour palettes as per the example below:
Map.addLayer(srtm, {min: 1200, max: 1350, palette: ['blue', 'yellow', 'red']}, 'Elevatic
13. For better visualisation we can create a hillshade view of the elevation data.
Remember you can use the Layer transparency options to create draped images for
colourised hillshades.
var hillshade = ee.Terrain.hillshade (srtm);
=
Map.addLayer(hillshade, {min: 150, max:255}, 'Hillshade');
TASKS
1. Import the Lusaka district shapefile as an asset in the EE environment
2. Import the shapefile into the editor
3. Create a variable called LSK_geometry by running the following code:
Var LSK_geometry = Lusaka_District.geometry();
4. Clip the SRTM using the LSK_geometry by running the following code:
Var clipped = SRTM.clip(LSK_geometry)
5. Use the clipped SRTM to repeat the tasks done on the original SRTM
Deliverables:
1. Lab Report – Concise and clear
2. Link to the repository