Vai al contenuto

Plugin QFieldSync

The QFieldSync plugin helps preparing and packaging QGIS projects for QField.

QFieldSync supports your project preparation with automating the following:

  • Required steps for project setup (e.g. portable_project)
  • Creating basemaps from a single raster layer or from a style defined in una vista mappa.
  • Configuring the offline editing functionality and synchronizing changes back.

Procedura

Per avere una visione d'insieme del processo, riportiamo una lista dei passaggi principali:

  1. Create a QField package. This is a working copy in a separate cartella.
  2. Copiare il pacchetto QField sul proprio dispositivo.
  3. Andare sul campo e raccogliere i dati.
  4. Copiare i dati raccolti sul campo all'interno del proprio computer.
  5. Sincronizzazione dei dati raccolti con il proprio database o file.

Installazione

In QGIS, open the plugin library and search for qfield sync. Select the plugin in the list and click on Install.

QField Sync in QGIS plugin repository
QField Sync in QGIS plugin repository

Configurazione

The project configuration is saved in the master .qgs project file. This way it is possible to pre-configure a project once and use it repeatedly.

Configure project
Configure project

Configurazione dei layer

Configure the project layers
Configure the project layers

In the project configuration dialog, an action can be defined for each layer individually. Depending on the layer type, different types of actions are available.

Copia

The layer will be copied to the package folder. This is only available for file-based layers.

Nessuna azione

The layer source will be left untouched. This is only available for non-file-based layers like WMS, WFS, Postgis...

Editing offline

A working copy of the layer is copied into the package folder. Every change which is done in the packaged project during work is recorded in a changelog. When synchronizing the changes back later on, this log will be replayed and all changes also be applied to the main data base. There is no conflict handling in place.

Rimuovi

The layer will be removed from the working copy. This is useful if a layer is used in the basemap and will not be available in the packaged project.

Configurazione della mappa di base

A base map is a raster layer which is added as the bottommost layer to the packaged project file.

If the base map option is enabled, a base map will be rendered, whenever the project is packaged. The area of interest - the extent which will be rendered -will be chosen at packaging time.

Ci sono due possibili opzioni per la mappa di base:

Layer

A raster layer. This is useful to take an offline copy of an online layer like a WMS or to take a working copy of an unsupported format like an ECW or MrSID layer.

Tema Mappa

A map theme. This is useful to create a base map based on a combination of several layers with styling. These layers can then be removed from the working package and do not need to be rendered on the device. This can save some disk space and battery on the device.

The tile size defines the spatial resolution. It determines the number of map units per pixel. If the map canvas CRS has meters as units and tile size is set to 1, each raster pixel will have a spatial extent of 1x1 m, if it is set to 1000, each raster pixel will have a spatial extent of 1 square kilometer.

Configurazione dell'editing offline

If only synchronize features in area of interest is checked, only features which are within the extent of the map canvas as packaging time will be copied to the offline editing working copy.

Package for QField

Once the project is configured, package it in a folder. This folder will contain the .qgs and the data used in it.

Package the project for QField
Package the project for QField

Copy the folder on your device. Open QField, open the project and start collecting data.

Make also sure to save the QGIS project using the regular Save As of QGIS as you'll have to re-open it later when you want to synchronize the changes.

Sincronizza da QField

When you want to synchronize what you have collected, re-open the project in QGIS (the one you saved with a regular Save As).

Copy the project folder from your device to your computer and use the Synchronize from QField menu to synchronize your changes from the protable project to the main project.

Synchronize from QField
Synchronize from QField

Make sure that you synchronize your data back only once. That means, if you go out again to collect more data, you should create a new QField package before to avoid sync problems later on (like e.g. duplicates).

Torna su