Update: Input has been renamed as Mergin Maps as of May 2022.

During FOSS4GUK 2019 in Edinburgh we ran a workshop for collecting data using Mergin Maps. This is the content of the workshop with all the datasets.

Prerequisites

To be able to work with Mergin Maps, you will need the following:

  • QGIS Desktop: download the latest (LTR) version of QGIS for your laptop here:    https://qgis.org/en/site/forusers/download.html
  • Mergin Maps app: from your mobile/tablet, visit https://merginmaps.com to install the app on your device. If you are an iOS user, Mergin Maps runs under TestFlight    which you will need to install first.
  • A Mergin account: visit  https://merginmaps.com/ and sign up for a Mergin account.
  • QGIS Mergin Plugin (optional, covered later)

Setting up the survey project

For the purpose of this workshop, we have prepared a QGIS project. Let'suse that as a starting point:

  • Log into Mergin
  • In the top-left, click on Projects and select Explore
  • Find and click on saber/foss4guk
  • In the top panel, click on the
mergin_clone
  • icon to create a copy of the project under your ownMergin account (foss4guk_YOURNAME)

Exploring the project in QGIS

The project you have copied in Mergin, is a QGIS project with variousmap layers. To see the content of the project in QGIS:

  • In Mergin, in the top menu, select Projects > My projects
  • Select foss4guk_YOURUSERNAME (or the name you assigned when copyingthe project).
  • In the top menu, click onthe
mergin_download
  • icon to download the project
  • Extract the content of the zip file

Alternatively:

The above process can be done through the Mergin plugin for QGIS. To dothat:

  • Install the Mergin plugin in QGIS
  • Restart QGIS
  • In the QGIS Browser panel, right-click on Mergin and select Configure
  • Enter your Mergin username and password
  • Under My Project, right-click on foss4guk_YOURUSERNAME and selectDownload
  • Select a location under which the project will be downloaded to
  • Once downloaded, select Open to open the project.

Layer settings and forms

Mergin Maps is based on QGIS, therefore, any layer symbology / styles you setin QGIS, will be displayed in Mergin Maps. If you are using SVGs (e.g. OSMasterMap), you need to embed these in the QGIS project.

Mergin Maps also supports most of the edit widgets from QGIS. Edit widgetsallow you to simplify filling-in forms with drop-down options,TRUE/FALSE switches, sliders, calendar and time, default values,attachments, value relations and more. To see some of those settings:

  • From the Layers panel (in QGIS), right-click on the listed buildings(points layer) and open the Properties window.
  • From the left-hand panel, select Attributes Form. Explore the variouswidgets assigned to different fields.

For this layer, we have set the Photo field to use an Attachment widget.This will allow Mergin Maps to make use of your mobile camera to attach photosto features.

For the Surveyor field, we have linked it to an external CSV table, topopulate a drop-down option with the names of surveyors.

Mergin Maps can also use a pop-up window (similar to Google Maps) to displaybasic information about a single feature:

   

 

To customise this pop window's content:

  • Open the properties table, and select the Display tab
  • You can see the title is set to ENT_TITLE and there is an image tagreferencing the Photo field:

   # image
   file:///[%@project_folder%]/[% "Photo" %]

Map themes

To simplify handling layer visibility, Mergin Maps makes use of map themesdefined in your QGIS project. In this project, there is a map theme foraerial photo (using a Bing aerial layer) and OpenStreetMap (geopackage).

[]{#anchor-5}Survey layer

In Mergin Maps, any vector layer (point, line, polygon) can be edited (as longas editing that format is supported in QGIS). This could be veryconfusing when dealing with large numbers of vector layers in a singleproject (trying to figure out which one to edit).

Luckily you can set background layers (or those you don't want to beeditable in Mergin Maps) to read-only:

  • In QGIS, from the main menu, select Project > Properties
  • In the new window, select the Data Sources tab from the left-handpanel

Below is the list of layers and their capability settings for theproject. Layers not marked as read-only will be shown as surveylayers (editable) in Mergin Maps.

 

By default, the file paths to layers are relative. You can change thatunder the General tab of this window.

Using Mergin Maps

To use Mergin Maps, open the app on your device. On its first run, Mergin Maps willshow the Projects page.

  • Under Projects, select My projects
  • From the list, find YOUR_Mergin_USERNAME/foss4guk_YOURUSERNAME(e.g. saber/foss4guk_saber)
  • Tap the download icon on the right-hand side of the project todownload the project (warning: if you are not connected to WiFi, thiswill use some of your mobile data allowance)
  • After downloading, tap Home
  • Select your downloaded project

 

When you open the project, you may not see all layers. This is becausesome of the layers have zoom-dependant visibility settings (againconfigured in QGIS).

Exploring the project

To switch map themes:

  • Tap More on the bottom-right side of the screen
  • Tap Map themes > aerial photo

 

You can also display feature details simply by tapping on them.

  • Tap on the point representing Queensberry House:

 

Capturing data

To capture data:

  • Tap Record
  • You can then choose the layer in which you want to record yourfeature, by tapping on the light green band, in the lower part of thescreen, above the Mergin Maps menu.
  • If you are capturing a point, by default, the suggested point tocapture will be on your GPS location. You can drag the map to adjust thelocation of the new point. To switch back to the current GPS location,tap the GPS icon on the bottom-left of your screen.
  • After adding a point, you will be prompted to fill-in the form.

If you are recording a line or a polygon, you can either add points to definethe shape of your feature or press and hold the GPS icon when inRecord mode to generate a shape from your GPS track.

Editing data

You can edit the existing features on your map. For point layers, youcan edit geometry and form data. For lines and polygons, you can editonly the form data.

Try it!

Let's get out and capture some data for the Path layer!

Uploading your changes

Once you have made changes to your data, you can upload them back to Mergin:

  • In Mergin Maps, tap Projects
  • Select My projects
  • Click on the sync/refresh icon to the right of your project

You can now download the project again to your desktop and see thechanges in QGIS. Alternatively, you can synchronise the changes you madeback to QGIS by using the Mergin plugin for QGIS (described earlier).

You might also want to read these

Let's make the QGIS work for you

Lutra Consulting is a QGIS-focused expert provider of geospatial software development, consulting, training, and support services.

Get in touch
By clicking “Accept All Cookies”, you agree to the storing of cookies on your device to enhance site navigation, analyze site usage, and assist in our marketing efforts. View our Cookie Policy for more information. Deny cookies here.