Introduction to terrain analysis in Google Earth Engine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
good afternoon everyone welcome back to our second lap of environmental monitoring and modeling my name is Sean Levesque I'll be guiding you through this tutorial today we're going to get deeper into Google's Earth engine and I'd like to start by acknowledging the Google Earth action team and especially their development of Earth engine beginning curriculum which is a very nice starting point for getting into Earth engine and so this led to is accessible through the learnline practical site you can also reach it by going to my website geospatial ecology Kham Kham and coming down to there to teaching the prerequisites so that you've completed lab ones and already have a engine account so please everyone log in to your health engine account when navigating to code danger google.com and you should have a clear script in the script window now we went through this yesterday but just go into a bit more detail this is a really nice image provided by the Google Earth engine team which shows all the different functions are available within the engine platform so it's discussed yesterday the environment is dominated by the large mapping window within that we have tools for zooming in and out we have geometry tools in the upper left corner over on the right we have the layer manager tab three windows on the top the first consists of the asset manager script manager the docks and the search bar at the top within the code editor we have space for writing code as well as dedicated space or imports we have the possibility here to export our script as a URL save the script run the script and to clear it again top right-hand panel consists of the inspector the console and the tasks so there's a bit of detail on what each of these areas is for and point two also covers some more basic JavaScript commands we touched on this yesterday and just to pick up a few points remember that JavaScript programming language we used to forward slashes to indicate comment lines you started two forward slashes and are ignored by the processor so we can use these to write comments to ourselves and to others sometimes we might like to write quite extensive comments and if that goes on to a second line can cause problems so we can use a forward slash and an Asterix like this star to demarcate multi-line comments I won't go through the rest of these now we're gonna jump straight through on to getting started with images and a little different today yesterday we we started with Sentinel 2 imagery but today we're gonna have a look at some elevation data so make sure you have a clear script starting a new session if you have an existing script say that use the clear script option under reset and let's start by navigating to somewhere of interest for today let's head over to take ado national park Northern Territory Australia kakadu is a very extensive National Park in the Northern Territory tropical landscape lots of wetlands a nice rocky hilly regions search for elevation click on SRTM digital elevation data 30 metres let's have a look we want elevation data Google is very strong in search of course so if we want to search for elevation data we have a number of options coming up today we're going to work with the SRTM digital elevation data so let's click on that that'll bring up some background information on the data product SRTM stands for a shuttle radar topography mission SRTM and was an international research effort to obtain digital elevation models on a near global scale this version of SRTM has a resolution of one arcsecond which approximates 30 meters on the ground this was really fantastic data set the first worldwide elevation data set theta means a resolution if you would like some more background on the mission you can click on this link here that'll take you to publication time far at all covering that data set that's important click the blue import button and we'll see in our script window that imports one entry the variable image images are TM data has been added we come down to 0.3 here we've already clicked import and let's rename the default variable image to be SRTM so all we do is click in this box on image and type SRTM and hit enter now let's add the let's print data to the console so highlight this little piece of code copy it paste it in line 1 and say run we'll see that that's now printed to the console we have the image USGS SRTM it's one band we look at the band's elevation is the data stored let's have a look at our next step that's great that we printed that to the console but we haven't added it to the map yet the command for adding a layer to the map is map dot add layer be careful with your your um other cases here uppercase M for map and for layout easiest to just copy it paste it into line - and when we had run that map will now be loaded over our region of interest pretty unsatisfying at first look washed out in grey that's because we haven't defined any visualization parameters so let's come back and look at this inspector tab so in order to add to obtain a better visualization we need a better color stretch so let's copy this line paste it into nine three actually we'll just paste that over line two so we don't duplicate Glam map dot add layer is our team min zero max 3000 well this min and max really depends on your area of interest and if you don't know the region to well then it would be good to explore it a bit with the inspector so let's go over to layers and let's make this a bit more visible using the transparency slider click on the hand over on the left hand side here and click on inspector now let's click around a bit in kakadu national park we click near the ocean we'll get an elevation of 4 meters as we would expect low-lying areas become a bit more inland slightly higher elevation you'll see we range from 100 meters 240 meters 300 meters so I would probably be safe leaving this min value as zero making the max let's go with we can make it a thousand meters just to be safe and let's rerun that script and now we see quite a lot more detail in our image if we thought that's too conservative we can make that 500 run it again and now we see a flock or more detail and zoom in a bit and see some very interesting topographic features and quite an escarpment the sharp edge dropping down to the floodplains of kakadu below let's go back to our our tutorial and just a note at the end of each of these little sections you'll see your script link if you click that link that will open the the script within your Earth engine environment now let's let's apply step number four section four let's apply a computation to an image so pan over to Kakadu National Park where there are some nice elevation differences let's add a simple computation for example a threshold above a certain elevation the example here is to create a variable high ground srtm GT that stands for greater than yes rpm greater than 2000 meters map and layer high that's our variable hi about 2000 meters well the area we working with is quite low so let's copy the script and paste it in here but let's alter this elevation of it because everywhere nowhere in our region is taller than 2000 meters let's make that rather 200 meters and let's rename this above 200 meters - to run that and here we see a mask in white these are all the areas that are have an elevation of above 200 meters so we can switch these off a bit remember our background map we can also switch to satellite view and you can use the slider to just have a look at where these higher elevation areas are taller than 2000 meters as we zoom in a little bit closer you can see that these areas marked out in white already these very rocky areas your country I could do so that's great what's next in our script - another computation to compute slope from the elevation data and displayed on the map as a separate layer also add a third parameter to the add layer method which name's alaya okay so let's just copy this we gonna make a variable slope Earth engine function terrain slope we're gonna perform that on the SRTM tada we're then gonna add this layer slope to the map to the map we're gonna define a min and max of 0 and 60 degrees and we're gonna call that layer smoke let's copy that I said let's run that first pilote elevation again at our threshold mask and here comes the slope layer on top so let's switch off the mask and elevation zoom in a bit more we see that very sharp edge of the escarpment can use the slide I just have a look at the image underneath very nicely we pick up that sharp changes in elevation using the slope function as the last step if we go back to our layers you'll see we have like layer 1 here for example it was when we first added the elevation data it's very nice always to give a proper name to the elevation other layers that we heading so it's just copy this again and that's over now script-based that so we're gonna make variable slope I'm gonna add layer to our map srtm we decided that 500 wants a better value and now we're gonna call elevation layer DM digital elevation model we're gonna add the layer slope again minute max suitable now when we run we'll have two layers that's just a much neater approach so a few things that that you can try search for a specific location an area that you know to have interesting elevation changes use the inspector to estimate the value range and play around a bit with the visualization parameters one thing we can try also that's not in the documentation but you'll see here that we've called a function Earth engine terrain down slope and if we head over to the docs section and go down so we see eita rain over here we open it we'll see that there are other commands we can call to work on elevation data aspect for example and hillshade for example so maybe let's just just try that let's come down a few lines and it's had a comment so that we know what could be doing it's called that give I'll show you to try and how we going to do this we're going to create a variable don't trade and we're gonna use the function changing terrain dot hillshade and we're going to perform that on our SRTM image and then we want to add it to the map so we'll use map and layout hillshade now 4 min and Max values when we've created Hill shaded image the image is grayscale so we know that the minimum x max values a good range is probably not to 255 and we're gonna call this hill shade we're gonna do that by and then don't forget and semicolon at the end of the line and that should reduce my skill shade for us we can run elevation now to load up slowly and that's up anyhow we have our kill shade view like illustrator is just great for looking at the shape of the landscape use your hand tool over here and navigate around the scene a bit we go to the latest tab we'll see we have hill shade slope and M switch off diamond slope for now and as we play about the visibility of it we can get the effect of creeping the image the terrain so they've see some structure in the landscape as we as we move it around brings into life a bit more three-dimensional perspective so that's great for visualization have a look at some of this rock country really remote landscapes very special places in kakadu now let's look at our next step we're gonna apply a spatial reducer select the polygon geometry tool and draw a triangle or a more complex polygon on the map and print the mean value for the region so let's copy this script and it's pasted over here let's change that default 3510 map head lay a geometry remember we haven't defined our geometry yet so let's do that so let's click on the polygon tool geometry and let's start off just by clicking a shape like this for example you'll see that the variable geometry is now defined and we should be able to just run that we flick to the console mean elevation we can see that the mean elevation this block is 298 meters if we wanted to look at a different area we have a few options we could easiest on or just Peter delete that geometry and go it somewhere else yeah and if we later on script again will now get the mean elevation of that block so that's a great great way to to quickly summarize pixel values region so let's remove these videos and you mount a bit this brings us to the end of the section dealing with elevation data very useful to have this information in any environmental monitoring study but the next part of our script is going to now look at bringing in Landsat 8 imagery be using the Landsat 8 topic atmosphere image collection and I'd like you to go through the rest of this tutorial in your own time going using the the system that we've just been in the following read each section very carefully copy and paste the commands into the script window let's read it's clear the script so that you have a script to start with and trying to follow each of these steps it's very important that when you're copying the code block you copy everything that's within these little grey boxes otherwise the codes will not run and even though we copying and pasting weren't you please to be looking at trying to understand what the different commands are actually doing and how they don't query data cube so thanks very much we'll pick this up again tomorrow good luck
Info
Channel: GEARS - Geospatial Ecology and Remote Sensing
Views: 4,619
Rating: 4.9365077 out of 5
Keywords: DEM, slope, hillshade, SRTM, GEE, remote sensing, cloud, geomorphology
Id: -t6xaoeixvQ
Channel Id: undefined
Length: 23min 1sec (1381 seconds)
Published: Tue Oct 31 2017
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.