Google Earth Engine Tutorial Part 1 - Displaying Data

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
and welcome back to our getting started with Google Earth engine tutorial we are going to be going today through data and we're going to be talking a little bit about what kind of data would be using what the data looks like and how to display it and so we'll be talking about some of the basics in Google Earth engine and then we're going to do a little bit of coding and then we're going to get ready for next time we're going to do more coding but this is just to get your feet wet we're going to be using raster data in our Google Earth engine applications this is data that's all divided up into cells that's how remotely since data is visualized and how it's stored inside computers imagine if you will a camera how it takes a digital image and then if you zoom in and zoom in you can see that the image right here is then going to be broken down into pixels with values and for the Google Earth purposes these values are going to be numbers called digital numbers and they usually are 8-bit values so they'll run from 0 to 255 and sometimes they can be in 16-bit so that sometimes something that you have to pay attention to especially if you're doing complicated banned math or any type of banned math you have to know am i working with 8-bit digital numbers or am i working with 16-bit digital numbers so for the purpose of Google Earth engine we have a lot of different types of data that we can work with there's a lot of different types of data sets that are available from Google Earth engine and I will pull up a few of those just so we can look at them here real quick and we will take a look at some of the interesting ones so this first one as you can see is a Landsat 7 32 day raw composite these are the raw data values here so they don't have any type of band math performed on them if you can see in some of these areas they're missing portions that's either when there was weather that prohibited the images from being taken or if there were other errors that prohibited them so this is why you have other data products or if you're trying to look for data within this area you might have to try another date see currently we're looking from April 6th to May 8th so if you have a longer date to look for data you can probably fill in some of these gaps and that's a raw data composite so that means again nothing has been performed on it to change those values if you want to look let's take a look at another form of data that we can use this is going to be our USGS national elevation data set this is in one third arcsecond and that is the degrees which the cells are divided up into so if you zoom in really really closely you're going to start to see the cell values here let's see if we can pull up I don't know how the clothes we'll have to zoom in to see them and so you'll be able to see that there have these different values for gray here and that's basically your elevation when you visualize it differently you can use different colors to make this a little bit more visually appealing but for now it's all displayed default gray but these are elevation here we go with a modest combined 16-day and DSi and this is actually the normalized difference snow index and this is one was derived from a paper Riggs at all 1994 and so this was a banned math dataset and so this is looking at the different snow cover from different days and this is a band map that's been applied over these these dates here and then finally another interesting data set is this night time lights data set this is data that's both from visual lights and from infrared light sources across the world and so you can see all the different light sources and so this might be an interesting data set if you're setting light pollution or urban concentration or anything along those lines it's a really really interesting data set that all of that to say that we have a lot of data that we can work with so what we're going to be doing now is we're going to be adding a image to the Google Earth engine script editor so the first thing we're going to do is we're going to create a variable in JavaScript so that's going to look something like that then you're going to give it a name be sure that when you are naming your variables that you always remember what you're naming them and give them significant names that have a meaning to you so you can go back through and find them don't make them too long because you're gonna have to type them a lot and then remember we're going to be adding our image we're using that function the image function and then we're adding in this image right here this is a Landsat image that I used a and D NGS Landsat portal to find out what you can essentially do is draw a box around an area and it'll give you all of the data they have in that area and then you can use the image ID that you derive from them I'll put the link to the NGS portal if you're interested in a certain area in the description so you can find it the next part we're going to be doing is we're going to Center the map around our image so that's what this soon two images we're going to use this function right here it's called map Center object and if we look up the documentation it says right here that it really turns the map it centers the map on a given object so that what that does is it takes wherever this valid wherever this image is located from the image ID and centers it around there and this is a zoom level that we've adjusted you can add geometry or features to it later but we're concerned right now with the zoom so if I run this this is what it does it centers the image around whatever area it centers the map around whatever area we're concerned on at the specific zoom level and these these little brackets right here is you know their documentation it's good to have this in your code so that way if you make a mistake or you need to go through it later or someone's going to be grading your code you want information on what you're doing and the logic behind what you're doing a lot of times if you're writing something that's much longer you need it you need this comments in here in order to help you make sense of what you already written and last but certainly not least we're going to be displaying the image and so that's how this looks we're using the function map dot add layer and we're adding in our what we called our self Texas image which we named up top and we are centering it and then we're adding it to the letter so if we run it this is what it looks like now you might be thinking to yourself that was looks pretty uneventful and what could you really derive out of this remember that Landsat images are not like photographs they're not in the visible light spectrum that you and I see when we think of photographs so this is the data that's actually applying and it's got digital number value so if we look at the inspector right here and we actually go and inspect it we can actually see what some of these values are in here and so we're going to be looking and seeing that we have some banned values in here and I think these are being multiplied by a certain factor because they usually shouldn't be this high but we'll have to check that out in just a second that's something that if you're doing banned math you're going to need to keep in mind and so if we ever wanted to have a better look at what we're actually visualizing or if we wanted to see what's actually in these the way that our eyes see them we're going to depend on some visualization Landsat 7 utilizes seven bands that each simultaneously gather data these bands are broken down based on wavelength and captured different parts of the visible and invisible electromagnetic spectrum the book that I linked to last time chapter to the later section has some really interesting basic information on the physics behind this so be sure you take a look at that if you're following along with me also there's I'm going to post a PDF that has some of the interesting banned combinations and the banned explanations so it'll tell you some of the ones such as the first and second one they deal with colors that we can actually see and then others are infrared or near-infrared in those we can't really see but we can visualize them in something such as Earth engine and so there are actually different combinations that we can use to see different things so we can have false color images we can have natural color images and so that's what we're going to be looking for looking for right now and if we want to display this map as a naturally colored image what we're going to need to do is we're going to need to create a color palette and we're going to need to tell the computer what bands to display so we're going to create another variable and that's going to be we're going to call it color and then we're going to give this a parameter that allows us to set the bands that we want to visualize we're going to say we're going to ask for the bands and we're going to display the bands we're going to display band 3 band 2 and band 1 now these need to be capitalized sometimes depending on the data set you get they can be finicky because it's actually pulling this data from the metadata itself so depending on the data set you pull sometimes in the capital sometimes at the lowercase and sometimes it's a little more convoluted than that in this particular case we have some variables that we're having to deal with as far as how the data is displayed this is a little more complicated and this deals with some more advanced remote sensing techniques so for now I'm just going to add these in and I will put a link to the Google Earth engine help where they explain what these variables are they're a little more advanced and so we're not going to get into why we're using them right now it basically is just going to give us a nicer looking image rather than one that just hasn't had anything done - and so this is all about visualization and not necessarily about the code you're actually going to be producing and so for the last part we have created a image variable over here we have told the map what to do here as far as how we want to see the map now we have created a color variable that's going to color and display these bands in particular and then what we need to do is we need to display those so we have our map layer down here and we're going to come and we're going to apply the color palette to it and there's comma in between so we have our map layer that we're going to be applying our South Texas we have our color which is our palette and what we've done is we've named it we've given it a title so that way when do we display it in the map and if you're dealing with multiple layers you can switch them on and off and see what you're actually dealing with so if we run this code now we get an error and let's see what that error is we are dealing with there was a misplaced bracket that was at the end here so that'll throw you off a little bit that's better so now what we can see here is we can see a true color visualization of this image and depending on what you're going to be looking for in particular you might adjust what bands you're visualizing if you're looking for vegetation you're going to switch them and there's a whole different there's many different types of combinations there's some that are known and there's a lot more that are scientific and some that are based on band math and more complicated computations so you can currently see that this is the Corpus Christi area you can kind of see the bay here you can see the the development over here one thing you should look at is is if we zoom in you can see how the pixels become more and more pixelated right here and you can actually see that if you're trying to distinguish maybe where a building is you're not going to actually find building corners you're going to find this blob here and that kind of depends on your resolution some images have a higher resolution and so the pixels are smaller meaning that you can maybe identify things on a smaller scale that again is a complicated remote sensing concept and it's not something that I'm going to go into quite yet maybe later on we can go into it if it's something that we need to discuss as far as visualization but for now just understand that you're not going to be able to use this to identify big features later on you might be able to find certain things say roads and we can visualize them based on certain band combinations and that's a really interesting thing to do we can also visualize temperature based on some other band math and I think we might get into band math in the next video that's it for the introduction to adding data to the layers in Google Earth engine and so join us next time when we will talk about adding in features and adding in image collections and feature collections and maybe we'll get into band map I want to talk about NDVI next time
Info
Channel: Maptical
Views: 35,837
Rating: undefined out of 5
Keywords: Google earth, google earth engine, google earth engine tutorial, remote sensing, gis, google earth tutorial, Earth engine, google maps
Id: qy6P4hrbvQQ
Channel Id: undefined
Length: 12min 50sec (770 seconds)
Published: Mon May 16 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.