Skip to content

Using QGIS 3 for Earth Observation

How easy is it to get access to Earth Observation data? Access to free and open data should be easy, it should be intuitive and not overly complex. It would be a terrific shame if freely available data wasn’t being used just because no one had any idea how to get at it, let alone how to use it.

I found a nice guide to downloading satellite imagery here. Unfortunately it doesn’t include, what feels to me at least, the simplest way and that is using the SCP, or to give it its full name the Semi Automatic Classification Plugin. It has been updated for QGIS 3 and is well worth exploring.

QGIS 3

QGIS 3 is a significant step forward in open source GIS. If you have been thinking about giving it a go but have been reluctant or concerned about GIS tools not being there then now is the time to take the step. It is incredibly powerful and I have found it faster on processing data than previous versions. It is a major upgrade. I have always felt that GIS and Remote Sensing are a natural pairing; within QGIS there are plenty of tools/plugins to satisfy many Earth Observation workflows. SAGA GIS is included in the processing toolbox and if you haven’t used SAGA GIS before I think you are in for a surprise. I’ll write more about SAGA at a later date. For now though I want to concentrate on accessing Earth Observation data easily.

Semi Automatic Classification Plugin

It is worth saying before starting that you will need an Earth Explorer username and password and/or a username and password for the sci hub https://scihub.copernicus.eu/. I assume this is for monitoring and usage statistics, but isn’t this just another barrier to the data for a user?

Getting Earth Observation data

This is how easy it is to get Sentinel 2 (or Landsat, or Sentinel 3, or MODIS etc):

Firstly, open QGIS 3. On opening it will look like or similar to this:

Navigate to the XYZ tiles, click and drag OpenStreetMap into the table of contents – the window called ‘Layers’ shown below.

Zoom and pan to the area you are interested in downloading satellite data from.

If you haven’t already got the Semi Automatic Classification Plugin installed, then navigate to Plugins in the main window, select manage and install plugins and search from ‘Semi Automatic Classification Plugin’ (it’s going to find it before you have even finished typing Semi).

Click on install plugin and let it install. You should see a dockable window appear in the bottom left of the screen.

This is the SCP plugin. You will only need to do this once, though plugins frequently get updated so it is worth checking periodically for bug fixes etc. Once you are at this point you are only a few clicks away from downloading some satellite data. SCP has many more functions than I am covering here. Check out the detailed videos for further information about working with satellite data.

Click on the button highlighted in red to open the plugin GUI. This is where we will download data from.

Navigate to the Download products button (on the left) and enter your username / passwords generated at the start on the login data tab.

Now it is time to search for data. Click on the Search tab.

The box I have highlighted in red is products available to download and the one highlighted in green is the data range. It is also worth setting the Max Cloud Cover % to a low number to improve the chances of finding the best image for you. First though we need to define our area of interest. Click on the button highlighted in a black square, minimise the window and return to the main QGIS screen. Left click to get the UL (upper left) and right click to get the LR (lower right). You should get a box drawn on your map.

Go back into SCP plugin (you can click the plugin button as before, or just maximise the SCP plugin window). Once you are happy with the search parameters click on the button next to the word Find.

If you click on one of the results in the product list a preview will appear in the window next to it. This is a really nice new feature in the latest version. If you click on the button I have highlighted below in red it will add the preview as a layer to QGIS.

 

This in useful as you can be reassured that the product is in the expected location. If you are happy at this point you can go ahead and download using the Run button, highlighted in red below.

If you do click the run button then SCP will begin downloading every band for every image that you have loaded into preview in QGIS. It will also be running preprocessing; more on that in a second though. If you do want to limit the bands that you download then click on the download options button highlighted in green and choose the bands you would like for the product you have selected. I am going to limit the download to bands 4,3 and 2 so I can create a true colour composite; I’ll also take the ancillary data.

Finally, let’s take a brief look at the preprocessing options for this data.

By clicking the button highlighted in red it brings us to the preprocessing tool. To apply DOS 1 atmospheric correction on the downloaded data I have checked the box shown above in the brown border. I could also perform many other functions at the same time and just let the SCP deliver the data exactly how I need it. These preprocessing tools could be run instead after download. When you are happy click on Run in the bottom right hand corner, select the folder you wish to save the data in and let the data download.

When finished you should have your Sentinel 2 images loaded as layers in QGIS. Hopefully you will find this a super simple way of getting free and open satellite data into QGIS. In a future blog I’ll write about how to proceed to using this tool to work with this data.

The data downloaded is highlighted in the red box and the preprocessed data is in the blue box (also loaded straight into QGIS).

Recap

  • GIS is the natural home to consume Earth Observation data. Why? Because of the spatial component of imagery, because most GIS software have many excellent tools to work with Earth Observation data and because GIS allows us to integrate with other data sets.
  • QGIS 3 is a major release and now is a great time to start using it if you have previously been reluctant.
  • Semi Automatic Classification Plugin will do all the hard work for you within QGIS to find, download and preprocess data.

I am a freelancer able to help you with your projects. I offer consultancy, training and writing. I’d be delighted to hear from you.

I have grouped all my previous blogs (technical stuff / tutorials / opinions / ideas) at http://gis.acgeospatial.co.uk.

Feel free to connect or follow me; I am always keen to talk about Earth Observation.

I am @map_andrew on twitter