Tutorial: Create a field data collection app for groundwater studies
2. Project preparation
2.3. Adding a survey layer
Vector layers can be added as survey layer for the Input app.
In this section we'll create a survey layer for collecting groundwater data.
The following steps will be covered:
- Create a point vector layer with the necessary attributes
- Styling of the points
- Make an attributes form using widgets
- Settings for the Input preview panel
Create a point vector layer with the necessary attributes
1. In the Main Menu go to Layer | Create Layer | New GeoPackage Layer....
2. Click the Browse button to go to your project folder and choose the GeoPackage from the previous section, in our case bangula_study_area.gpkg.
3. For Table name type Survey. For Geometry type choose Point. Make sure the projection is set to EPSG: 32736.
4. Now we're going to add the attributes. Add the attributes like in the screenshot below. Add them by using the Add to Fields List button.
5. Click OK when done.
6. A popup will ask you if you want to overwrite or add a new layer. Choose Add New Layer so it will be added to the GeoPackage.
Styling of the survey points
Make an attribute form using widgets
"Type" = 'Wells' OR "Type" = 'Boreholes'
. Check the box to Enforce expression constraint.
"Type" = 'Wells' OR "Type" = 'Boreholes'
Check the box to Enforce expression constraint.
Settings for the Input preview panel
Similar to Google maps, when a feature is identified on the map a
preview panel will appear. To enable a layer being identified, the
option should be enabled in QGIS desktop, under Project properties.
27. For setting the preview panel, you need to click right on the Survey layer in the Layers panel and choose Properties. Then select the Display tab.
28. Change Display Name to Observation ID. This will show the Observation ID when you tap a surveyed point.
29. Add the following lines under HTML Map Tip:
# image
file:///[%@project_folder%]/[% "Picture" %]
This will be interpreted by the Input app to show the picture when the surveyed point is tapped.
30. Click OK to close the dialogue.
Our Survey layer is ready now.
In the next section we'll do some final settings of the project.