Tutorial: Create a field data collection app for groundwater studies

Site: OpenCourseWare for GIS
Course: GIS training for Hydrogeological Applications
Book: Tutorial: Create a field data collection app for groundwater studies
Printed by: Guest user
Date: Thursday, 25 July 2024, 9:49 PM


1. Introduction

In the previous topic we have learned how to use data that is available on the internet.

Often, however, you have to collect your own data, because it's not available or too coarse in the online sources. Nowadays you would use an app for that.

After this tutorial you'll be able to:

  • use QGIS to setup a surveying project
  • configure map themes with online and offline layers
  • design the field form
  • synchronise the QGIS project with the Mergin cloud service
  • synchronise the Input app on the mobile phone with the Mergin cloud service
  • use the Input app for surveying
  • synchronise the data collected in the field with the Mergin cloud service and the QGIS project

Input is a simple survey app allowing users to capture data in field. Forms and data preparation can be done in QGIS software and synchronised with the Input app using the Mergin plugin and repository.

Input is not aimed to be a full GIS/mapping application. It is designed with simplicity, ease of use and seamless data synchronisation in mind.

A typical workflow for using Input consists of the following steps:

  • Preparing project: user loads background and survey layers, set up the forms, apply styling to the layers, set up map themes and define the layers to be used for survey purpose.

  • Data/project transfer: once the project set up, users need to transfer data to the device. This can be achieved through Mergin.

  • Working with Input: map navigation, data editing, including filling the forms, viewing existing data and uploading the changes back to Mergin.

In this tutorial the workflow will be demonstrated for field data collection for groundwater studies.

2. Project preparation

We will start with preparing the project in QGIS.

In the project we have to distinguish:

  • Background layers that provide context in the field

    We can use both offline and online layers and they can be raster or vector.

  • Survey layers

Our project will have the following background layers:

  • Google satellite online
  • Google satellite offline
  • OpenStreetMap online
  • OpenStreetMap offline
  • Vector layer with boundary of the study area
We'll create one survey layer for groundwater studies.

2.1. Adding the study area boundary

First we're going to define the study area boundary and add that polygon to the project, so we also know where the border is when we're navigating with the app in the field.

1. Start QGIS with a blank project

2. Change the projection of the project to UTM Zone 36S/WGS-84 by clicking on the EPSG code in the lower right corner .

3. In the dialogue filter on the EPSG code 32736, select the projection and click OK.

4. Install the QuickMapServices plugin: in the main menu go to Plugins | Manage and install plugins...

5. Install the QuickMapServices plugin.

6. In the main menu go to Web | QuickMapServices | Settings

7. In the QuickMapServices Settings dialogue click the More services tab.

8. Click Get contributed pack.

9. Click OK in the popup.

10. Click Save to close the QuickMapServices Settings dialogue.

11. In the main menu go to Web | QuickMapServices | OSM | OSM Standard.

Now we need to find the location of our study area. Here we'll use an area near Bangula within the Shire study area in Malawi of the previous tutorials. But you can use the same methods for any other area.

12. Install the GeoCoding plugin.

13. Click the button to open the GeoCoding plugin.
14. Type Bangula in the Geocoding dialogue at Find address.

15. Click OK.

16. Choose Bangula, Nsanje, Southern Region, Malawi.

17. Click OK.

18. Zoom in to the area of interest. In our case we zoom in to an area with the city of Bangula and the pivot irrigation.
Study area OSM

Now we're going to create a boundary polygon based on the extent of the area in the map canvas.
Note that if you need another area, you can replace the following steps by simply digitizing the boundary polygon.

19. Open the Processing Toolbox: in the main menu choose Processing | Toolbox.

20. In the Processing Toolbox choose Vector geometry |  Create layer from extent.

21. In the Create layer from extent dialogue click and choose Use Canvas Extent.

The boundary coordinates of the current map canvas are now filled in using the projection of the project. Therefore it was important to set that at the beginning of this tutorial.

22. Save the output Extent to a dedicated folder where we're going to save all the project data. In that folder save it to a GeoPackage with the name Bangula_study_area.gpkg.

23. Click Run. Click Close to close the dialogue after processing.

Now the wole rectangle polygon is filled with a random colour. Let's style the boundary.

24. Select the Bangula_study_area layer from the Layers panel and click to open the Layer Styling panel.

25. In the Layer Styling panel click on Simple fill. Then change the Symbol layer type to Outline: Simple line. Change the colour to red and make the Stroke width 0.66 mm.

Now the boundary polygon is ready.

26. Remove the GeoCoding Plugin Results layer from the Layers panel.

Save the project with the name Bangula_Groundwater_Survey to the Bangula_study_area.gpkg GeoPackage.

27. In the main menu choose Project | Save To | GeoPackage...

28. Connect to the Bangula_study_area.gpkg GeoPackage and type Bangula_Groundwater_Survey at Project.

29. Click OK.

Study area boundary

Because this isn't a survey layer, we need to make this vector layer read-only. The Input app interpretes read-only layers as non-survey layers.

30. In the Main Menu select Project | Properties...

31. Select the Data Sources tab.

32. Check the box for Read-only for the Boundary layer.

33. Click OK.

In the next section we'll add the Google Satellite layer and make OSM Standard and Google Satellite available offline too.

2.2. Add online layers and make available offline

If you have internet connectivity in the field, you can use a WM(T)S or online XYZ tiles as your background map. In the previous section we've already added the OSM Standard layer. In this section we'll also add Google Satellite to our survey project. We'll also make the online layers offline available just in case we don't have internet connectivity in the field.

Let's first add Google Satellite to the project.

1. In the main menu go to Web | QuickMapServices | Google | Google Satellite.