Tutorial: Collect Open Data from online sources
| Site: | OpenCourseWare for GIS |
| Course: | GIS training for Hydrogeological Applications |
| Book: | Tutorial: Collect Open Data from online sources |
| Printed by: | Guest user |
| Date: | Tuesday, 10 February 2026, 9:21 PM |
Description
Table of contents
- 1. Introduction
- 2. Download Africa Groundwater Atlas Country Hydrogeology Maps
- 3. Visualise Africa Groundwater Atlas Country Hydrogeology Maps
- 4. Search for layers on GeoNode
- 5. Load a WFS layer from GeoNode
- 6. Export WFS layer to vector format
- 7. Import a CSV file
- 8. Add transboundary aquifers from the SADC Groundwater Information Portal
- 9. Save data and styling to a GeoPackage
- 10. Save an entire QGIS project in a GeoPackage
1. Introduction
- 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:
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.
14. Save the project. In the main menu choose Project | Save as... and call it for example malawi.qgz.
In the next section we're going to add more data from the internet to this project.
4. Search for layers on GeoNode
Malawi has a Spatial Data Infrastructure (SDI): the Malawi Spatial Data Platform (MASDAP), which is built on GeoNode.
In this section we're going to add data from MASDAP to our QGIS project.
1. Browse to the Malawi Spatial Data Platform
2. In the Search field type groundwater and press the <Enter> button.
Now you'll see this result.
3. Click on the layer name and inspect the metadata and attributes of the layer.
With the Download button you could download this data. In the next section however, we're going to connect to this GeoNode from QGIS and load the layer into our project.
5. Load a WFS layer from GeoNode
Instead of downloading the groundwater_monitoring_wells_Coordinates layer we're going to make a connection between QGIS and the GeoNode of MASDAP to load the layer as WFS in our QGIS project.
1. Go back to the QGIS project.
2. Click the Open Data Source Manager button in the toolbar.
3. Choose the GeoNode tab.
4. Click the New button to create a new service connection.
5. In the Create a New GeoNode Connection dialogue type MASDAP as Name and http://www.masdap.mw as URL.
6. Click Test Connection.
If the test is successful you'll see this popup:
If the connection fails, check your internet connection and the URL.
7. Click OK to close the popup.
8. Click OK in the dialogue to close it and the new connection is added.
9. Click the Connect button.
You'll now see the layers on the GeoNode listed.
10. Type groundwater at Filter.
It shows the groundwater_monitoring_wells_Coordinates layer as WMS and WFS Web Service.
WMS
(Web Map Services) are rendered pictures of the data. That's useful for
quick visualisation of the data. WFS (Web Feature Services) are the
vector features that you can further use in analysis in GIS. Here we're
going to use the WFS layer.
The project should now look like the figure below.
In the next section we're going to export the GeoNode WFS layer to a local GIS vector file.
6. Export WFS layer to vector format
The GeoNode layer fromt the previous section is still a WFS layer.
To use it locally it's recommended to export it to a GIS vector format. In this section we'll convert it to an ESRI Shapefile and change the projection from the Geographical Coordinate System (GCS, EPSG: 4326) to UTM Zone 36S / WGS-84 (EPSG: 32736).
1. Click right on the geonode:groundwater_monitoring_wells_Coordinates layer in the Layers panel and choose Export | Save Features As...
2. In the Save Vector Layer as... dialogue choose ESRI Shapefile as the output Format. Use the button to browse to the project folder and save the output layer as groundwater_monitoring_wells.shp.
3. Click the Select CRS button .
4. In the Coordinate Reference System Selector type 32736 at Filter and select the WGS 84 / UTM zone 36 S projection.
5. Click OK to return to the Save Vector Layer as... dialogue, which should look like the figure below.
6. Click OK to perform the layer export.
After processing the layer is added to the map canvas.
7. Remove the geonode:groundwater_monitoring_wells_Coordinates layer from the Layers panel.
The project should now look like the figure below.
We'll add more data in the next section.
7. Import a CSV file
In this section we're going to import a CSV file with Ramsar sites in Malawi.
Ramsar sites can be downloaded from the Ramsar Sites Information Service. It contains 2,403 Sites covering 254,307,159 ha.
1. Browse to the Ramsar Sites Information Service.
2. Under Explore by filters choose Africa.
3. After the map with Ramsar sites in Africa has loaded choose Malawi from the list under Explore by filters.