Whether you are collecting data in the field or on desktop, Mergin Maps makes it easy to work collaboratively on your QGIS projects. The Mergin Maps platform gives you everything you need to work with your team including reliable synchronization, project versioning, customisable user roles and cloud storage. In this article, we’ll discuss how you can use Mergin Maps to work collaboratively whether your team members are in the field, at a desk or any combination of both.
How the synchronisation works
Before delving into the different workflows for project collaboration, let’s have a look at how synchronisation works in Mergin Maps. Users create a QGIS project and upload it to the Mergin Maps server. Any layers that will be edited by collaborators will need to be stored as GeoPackage layers in the project directory. Once the project is uploaded to the server, multiple users can download the project to their local device using the Mergin Maps App or QGIS Plugin. They can make changes to the GeoPackage layers in their local copy and then synchronise the project, which will update their project with any pending changes from the server and then upload their local changes to the shared project on the server.
Synchronisation in Mergin Maps is enabled by the Geodiff library. When a user downloads the project, Mergin Maps records the current version of the project on the server. When users make changes to their local GeoPackage files, Geodiff creates records of these changes called ‘diff’ files. When the user synchronises their project, their local version is compared to the latest version on the Mergin Maps server, any diff files that have been uploaded to the server from other users will be downloaded and applied to the user’s local version. Then any diff files generated by the user will be applied to the project and uploaded to the server and a new version of the project is created. If you want to learn more about synchronisation in Mergin Maps, you can find a more detailed explanation in our documentation.
This method of versioning and recording local changes means that users can work collaboratively on mobile and desktop platforms. Even if a user does not have access to the internet, they can work locally on the project and then upload changes when they have access again.
Collaborative working scenarios
Now that we have an understanding of how the Mergin Maps synchronisation process works, we can look at a few common scenarios for collaborative working with the platform. The three most common scenarios are working with a project administered in QGIS with the majority of work done by field users on the mobile app, a blended approach where the project collaborators are working in both QGIS and the mobile app, and a desktop based collaboration where most workers are editing the project in QGIS. We’ll also discuss various user roles in these scenarios. In Mergin Maps, users can be assigned specific roles which define their permission levels for projects on the Workspace. The available roles are defined as follows:
- Reader - can only download and view projects, but is not allowed to make changes.
- Editor - can add/edit/delete features on GeoPackage survey layers in the project. Is not able to change layer or project properties.
- Writer - all of the permissions of Editor, but is also able to change layer and project properties or add and remove layers from the project.
- Admin - all of the permissions of a Writer and is also able to add or remove projects from the workspace. Admins can also manage users on the workspace and assign user roles.
- Owner - all of the permissions of the Admin but can delete the workspace and manage the subscription.
- Guest - can be assigned Reader, Editor, Writer or Owner roles to specific projects and are only able to see projects they have been assigned. (Project Owner is different from the Workspace Owner. This role allows you to manage access to the project or transfer and delete the project.)
Mobile collaboration
The most common use case in Mergin Maps is where the majority of work is done in the field with mobile devices. In this scenario, a GIS project administrator will develop the project in QGIS and then assign workers in the field who will collect data with mobile devices and synchronise it to the main project.
User roles
Under this scenario, the project manager will have an Admin role and the field workers will be Editors. In some cases, you may have a team of desktop GIS users who could use Admin or Writer roles, depending on whether you want each user to be able to manage multiple projects on the workspace. The app only allows editing of the survey layers, so the field users will not need any higher permissions.
Project setup
You will want to consider where your survey will be conducted. If users are going to be in remote locations without access to a mobile data connection, you may wish to create some offline background maps to make the project more usable offline. You also might want to consider using storage saving features like selective synchronisation so that only attachments created by the user are stored on their device.
Mixed mobile and desktop collaboration
Another common scenario for teams using Mergin Maps is where some users will be working as mobile field users and others will be working on the project from the desktop platform. Users will work in QGIS to prepare data for field collection and process it after it has been recorded by surveyors in the field.
User roles
In this scenario, the division of roles within the project is important to avoid errors. Desktop user roles will need to be carefully considered to avoid project settings being overridden by mistake. Users who only need to interact with the survey data should be limited to Editor roles while those who need to access project settings should have Writer roles or Admin if they also need to manage project access. Similar to the previous scenario, users who will only be collecting data in the field should have Editor roles.
Project setup
This scenario provides a more flexible workflow. You will want to consider which methods are the best for desktop users to interact with the data compared to the field users. This might mean that you’ll want to create different project themes based on whether a user is in the field or on a desktop. You may decide to use a PostgreSQL database to manage more complex data flows. Mergin Maps has various plugins to manage data synchronisation and access such as:
- db-sync - a command line tool that connects your Mergin Maps project to a PostgreSQL database. You can set filters for which tables are synchronised between the database and project. The synchronisation can be run using a script or configured to run at set intervals. You can set more complex access restrictions for desktop users within the database while field users will only access tables that are included in the sync.
- work-packages - this tool lets you divide a single Mergin Maps project into multiple sub-projects. The tool is configured to divide the project based on filtered values set within the project tables. The benefit of this approach is that users only have access to data that is assigned to them or they can be granted access to the main combined project. Data is synchronised multi-directional between the sub and master projects.
Desktop collaboration
This is an increasingly popular collaboration scenario for Mergin Maps users who want to work collaboratively on QGIS projects in a desktop environment. The project history and user access controls is a significant improvement to working collaboratively with a shared drive. Using Mergin Maps ensures better data integrity and makes it easier to track user edits.
User roles
Similar to the mixed approach, teams working collaboratively over desktop will need to consider project permissions carefully. Since desktop users can remove files, edit project properties, add or remove layers, and other changes that could impact the project as a whole, only giving users the level of permission required for their role will prevent inadvertent data loss.
Project setup
Project setup can be pretty flexible with this scenario. You can also save storage on your Mergin Maps server by storing background layers outside the project directory, as long as the relative file paths between the project file and static layers are the same on all users’ devices. Communication between users will also be important in this scenario. When making changes to project settings such as layer symbology, adding/removing layers or adjusting project properties, users will need to communicate when they are making these changes so other users can synchronise their projects before and after these changes are pushed to avoid overwriting any changed project settings.
Mergin Maps makes collaboration easier
Whether your team is working in the field or on a desktop, Mergin Maps is a powerful tool that makes collaboration with QGIS projects easier. The platform is built with shared working in mind, making sure that your project data access is reliable and secure. Mergin Maps has a fully open-source Community Edition or a Premium SaaS offering which comes with regular updates and customer support. If you are new to Mergin Maps, check out a free trial to see how it can improve your team’s workflow!