Google Earth Engine in QGIS - QGIS GEE 01 | burdGIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] bat fans welcome back today we're looking at using Google Earth engine in QGIS this video is the first of a three parter and we're going to be looking at how we can put together what is playing on your screens right now to do this we're going to use three tools we are going to use Google Earth engine we're also gonna use some code and then we're also going to use QGIS Atlas it's quantum baby let's get stuck in first step in our road to geo get furry is to get Google Earth engine working in QGIS and to do this you need to be working with QGIS 3.8 or higher today I'm working in three point 10 which is the latest long-term release and we get all this fun stuff but when we open it up very lucky that Google Earth engine plug-in has been created so if we go to our plugins menu and then manage and install plugins we can hit all and we can start typing Google Earth and you'll see that the Google Earth engine plug-in appears there is more info you can go to the home page bug tracker at such a we'll have a look at the home page in a minute but for now we are going to install the plug-in now this might take a little time so why not make a cup of tea once the plug-in is installed you'll see the old familiar logo and if we go to our installed plugins there it is let's just clear that search box so you can see it in context Google Earth engine now you might be wondering where is Google Earth engine on my toolbars do I have a Google Earth engine toolbar available no you do not this is run entirely through Python so we don't need any interface changes at all once you've installed the plug-in it will check to see whether or not you are authorized to use Google Earth engine and you might need to go to Google Earth engine home page and just hit the signup button here for that in details and there you can be signed up and it says here that for my email address if I'm already signed up so that's all good in order to authorize QGIS to use your account you'll need to follow a link and then put a code in it's all pretty simple and fairly straightforward if you feel like you do need any extra help you can always leave me a comment below and if you go up to your plugins and go to Google Earth engine and hit user guide that helpfully takes you right to the home page of the plug-in itself so we need to test this out and make sure that it's working again if we go into plugins we need to open up a Python console and here it is the good old faithful to start off with will try and import the earth engine library and we're just going to do import EE hit enter and that's gone through without any problems at all if there were any problems with installation that import statement might throw an error like this and I have noticed sometimes if I close QGIS and then reopen it I do have to go up to plugins have a look at my available plugins and just switch on Google Earth engine again and if you do that then your import statement will work without a problem now if you read through the home page of the plug-in there is a second import statement that most of our scripts are going to need and that is from EE underscore plug-in import map let's just try that one out that's also working excellent news now rather than working in the console all the time I prefer to use the editor so don't forget you can hit that show it a button and it will open up so I've just put this in port E and from EE plug-in import map into my editor and if I run that you can see over in the console everything is working now when I first started looking into this I searched for Google Earth engine and QGIS and came across this blog post which was very helpful from geo dos so thanks a lot for putting this out guys they walk through the installation and you can see here as well about choosing an account and getting authorized or good and down here we actually have some sample sprits so I'm going to be very cheeky and just copy this and then we're going to stick it in to QGIS Python editor here we are back in queue and if I just pop that in then we have code from geo dose that's ready to run so let's get ready to ruin it and up here we just hit run script over on the left in the console we can see it running and in our layers panel we can see a false color composite appears and currently we can't see anything now this may well be a problem with the zoom so if we get some bearings here let's just go down to coordinate and type in world and that brings up our world map and you can see that resumed right out not sure why this is happening but I believe that what we brought in was San Francisco Bay so if we use our powers of jog we can zoom into San Francisco Bay and see that false-color composite come to life fantastic now what we've done so far let's be honest is copied and pasted code into an editor and then it's produced stuff and let's go back something I always like to do and have a look at what the code is actually doing so we've got a variable called image and we're going to bring in an ee image that is Landsat LC 0 8 so I imagine that is Landsat 8 and it's going to be top of atmosphere and this looks like we have got a date in there and then we're going to define the visualization parameters and so we've got bands 5 4 & 3 these are going to be the min and Max values and then we're going to put gamma stretch on it as well now the map Center doesn't seem to be working at the moment because we are not zoomed in so I'm just going to try these look like the coordinate sure and then with the zoom that looks like that's going to be the end item so let's try this again with the zoom of 20 and see what happens and it's run again and you can see with the zoom of 20 it has zoomed is right in so it's always quite fun when you're working with code just to change some things around and see what happens for example instead of false-color composite we can change that to false-color composite format fans and if we run this code again we are zoomed right in and you can see that we have added over on the side a different title for that particular layer we're still zooming into 20 which is not very useful let's try that again and zoom in to 10 that looks a lot better and we can run this time and time again one of the beauties of working with code now over on the left you'll notice that we've got the false-color composite in there and the one that we again the false-color comes it format fans now if you do save your QGIS project and you've got some layers that have been produced by the plugin the QGIS install that you're working with will need the plug-in installed in order to load these layers so just keep that in mind and what else can we do with the Google Earth engine plug-in the answer is a lot and if we go back to the earth engine website you can get into the data catalog and view all of the data sets that are available and there are loads now which one we'll be using for the gift that we had at the start and it's actually one from The Sentinel 5p so let's have a look at using that once you've allocated the dataset that you're interested in you can read a little bit about it Sentinel 5 precursor and when it was launched what it looks at and here I'm looking at nitrogen dioxide in real time so let's just click on that this will open up the dataset page and here we can see the provider we've got a little Earth engine snippet I'm just gonna copy that for the time being and then let's have a look further down we've got a description we've got the band's image properties and the Terms of Use and down here we can explore this in Earth engine now you might be looking at this code and wondering why it doesn't look like Python well that's because it isn't it is in JavaScript and you'll find with a lot of the earth engine examples that they are written in JavaScript now I copied the collection for the Sentinel 5 P and I'm just going to pump that into here just so I can see what's happening I'm going to change the name of the layer to my 5p test and then we're going to hit run what do we think is going to happen is it going to work no it is not going to work and that is because we've got an image collection here we need some extra parameters in there now back on the Earth engine catalog page we can see what else we need we need to select what we've been a select from this particular image collection we need a fill today and we should probably change our band vis as well so there are a few things that we need to change now this code currently doesn't look a lot like Python and it isn't it is in JavaScript in part two we are going to have a look at how we can convert JavaScript code into Python so that it plays nicely with QGIS I think that will do it for today thanks very much for watching don't forget to Like and subscribe and of course you can leave a comment below been getting some good comments recently and I do try my very best to get back to all of you as soon as possible keep an eye on the prize this is what we're aiming to eight and tune in next time to see how we can convert JavaScript to Python and happy map
Info
Channel: burdGIS
Views: 18,243
Rating: 4.9797978 out of 5
Keywords: burdGIS, GIS, mapping, geospatial, cartography, remote-sensing, QGIS, QGIS 3, Google Earth Engine, GEE, Python, QGIS GEE plugin, Nitrogen dioxide, global, NO2, geogiff
Id: Z4p-sRI20vM
Channel Id: undefined
Length: 11min 15sec (675 seconds)
Published: Wed Mar 18 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.