Tutorial: Collect Open Data from online sources

Site: IHE DELFT OPEN COURSEWARE
Course: GIS training for Hydrogeological Applications
Book: Tutorial: Collect Open Data from online sources
Printed by: Guest user
Date: Friday, 3 December 2021, 11:24 AM

1. Introduction

Nowadays a lot of data for groundwater studies is available through Spatial Data Infrastructures (SDI) and other online resources.

In this tutorial we're going to gather data for a groundwater study in Malawi and store the data, styling and QGIS project in a GeoPackage that we can easily share with others.

After this tutorial you'll be able to:
  • Download the Africa Groundwater Atlas Country Hydrogeology Maps
  • Visualise the Africa Groundwater Atlas Country Hydrogeology Maps in QGIS
  • Load data from different GeoNode SDI's into QGIS
  • Import CSV files
  • Save data and styling to a GeoPackage
  • Save a QGIS project to a GeoPackage

2. Download Africa Groundwater Atlas Country Hydrogeology Maps

First we're going to download data on geology and hydrogeology for Malawi from the Africa Groundwater Atlas.

1. Go to the following website: https://www.bgs.ac.uk/africagroundwateratlas/downloadGIS.html

Here you can download ESRI Shapefiles with the hydrogeology (aquifer type and productivity) and geology (with particular relevance to hydrogeology) of 38 countries in Africa.

2. Click on Malawi.

3. Fill in the Download Form and click Submit Form.

4. After submitting the form you'll see a page where you can download the data directly.

You'll also receive an e-mail with the link.

5. Download and extract the zip file to your hard disk, e.g. Z:\.

Note that the files are zipped at the folder level. When you extract the file the folder Malawi will appear in the folder where you extract the file (e.g. Z:\Malawi). A good open source zip programme is 7-Zip.

In the next section we're going to open the data in QGIS.

3. Visualise Africa Groundwater Atlas Country Hydrogeology Maps

After downloading the Africa Groundwater Atlas Country Hydrogeology map for Malawi and extracting the zip file, we can open the ESRI Shapefile in QGIS.

1. Start QGIS with a blank project.

2. Go to the Browser panel, look for the folder where you've extracted the Zip file and drag the Malawi_HG.shp layer to the map canvas.

Let's inspect the attribute table of this polygon vector layer in ESRI Shapefile format.

3. In the Layers panel click right on the Malawi_HG layer and choose Open Attribute Table.

The attribute table has two fields: MaIGLG and MaIHGComb.

The MaIGLG field gives the geology and the MaIHGComb gives the hydrogeology of the features.

4. Check the PDF file that came with the data for a detailed explanation of these attributes (AfricaGroundwaterAtlasCountryMapsUserGuide_OR19035_V1_1.pdf). You can find this file in the same folder as the Malawi_HG.shp file.

Unfortunately the data only comes with ESRI .lyr files for the legend. These can only be converted to a QGIS supported format using the SLYR tool, which is proprietary software.

Here we're going to style the geology and the hydrogeology manually, based on the colours this wiki page: http://earthwise.bgs.ac.uk/index.php/Africa_Groundwater_Atlas_Hydrogeology_Maps

5. Click on the Malawi_HG in the Layers panel and click the button to open the Layer Styling panel.

6. In the Layer Styling panel choose the Categorized renderer. For Value choose the MaIGLG field and click Classify.

7. Remove all other values by clicking it and then the button. all other values is always automatically added for the features with nodata. In this case we don't have features with nodata.

The screen now looks like this:

Styling geological map

Now we have assigned random colours. You can manually adjust the colours.

8. In the Layers panel double click on a coloured square of the legend of the Malawi_HG layer and change the colour using the Symbol Selector dialogue in the popup window.

9. After styling click right on the Malawi_HG layer in the Layers panel and choose Rename Layer.

10. Rename the layer to Geology.

11. Click right on the Geology layer in the Layers panel and now choose Duplicate Layer.

12. In the same way as in steps 9 and 10 rename this duplicate layer (Geology copy) to Hydrogeology.

13. Now apply steps 5 to 8 to style the Hydrogeology layer using the MaIHGComb field.

The result should be similar to the figure below.