document
Premiers pas

Premiers pas

2024-11-27 QFieldSync The QFieldSync plugin for QGIS helps preparing and packaging QGIS projects for QField. QFieldSync supports your project preparation with

Related articles

Meilleur VPN gratuit pour Chrome en France [2024] : Pour une navigation sécurisée OpenVPN : Installer un Serveur VPN sur Raspberry Pi (en 5 min) Configurer le client VPN de la Freebox Comment les VPN fonctionnent Extension VPN pour Google Chrome : quelle est la meilleure ? Proxy web ou VPN, quelle est la différence ? Comment choisir ? Installer ExpressVPN pour Windows 10 & plus

QFieldSync

The QFieldSync plugin for QGIS 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 a map theme.
  • configure the offline editing functionality and synchronize
    change back .

Flux de travail

Pour avoir un rapide aperçu du processus, voici une liste des étapes classiques :

  1. create a QField package . This is is is a work copy in a separate
    folder .
  2. Copier le paquet QField sur le périphérique-cible.
  3. Sortir en extérieur et collecter des données.
  4. Copie-retour des données modifiées vers votre ordinateur
  5. Synchroniser les données modifiées avec votre base de données ou vos fichiers

Installation

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

Premiers pasQField Sync in QGIS plugin repository

Configuration

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.

Premiers pasconfigure project

Configuration de la couche

Premiers pasConfigure 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.

Copier

The layer will be copy to the package folder . This is is is only
available for file – base layer .

Pas d’action

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

Édition hors-ligne

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.

Enlever

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.

Properties

There are some additional options to fine tune your QField project in the properties

  1. Lock geometries: do not allow changing geometries and only allow changing attributes on this layer.

  2. Set up the attachment default naming, please refer to the Configurable picture path

  3. Set up the maximum number of items shown in the relation editor widget

Premiers pasQFieldSync Layer Properties

Configuring maximum items visibility for QField

To adjust the maximum number of visible item in a relationship within QField , follow these step :

  1. Access Layer Properties Dialog :
  2. Open the layer properties dialog in QGIS where the relation editor is displayed.

  3. Navigate to QField Tab:

  4. Locate the QField tab, typically located at the bottom of the layer properties dialog.

  5. modify Relationship Configuration :

  6. In the « Relationship configuration » section, locate the section corresponding to the relationship you want to modify.

  7. Adjust Visibility Limit:

  8. Within the row for the desired relationship, find the « Maximum number of items visible » column.
  9. Delete the existing numerical value to set the visibility to « unlimited », the field will transform from a number (default 4) to « unlimited ».
  10. Click « Apply » to save the changes to the layer properties.

Premiers pasMaximum items visible for relation

Premiers pasQField Visible items

configuration du fond de plan

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 enable , a base map will be render , whenever
the project is package . The area of interest – the extent which will be
render -will be choose at packaging time .

Il y a deux sources possibles pour un fond de plan :

Couche

A raster layer . This is is is useful to take an offline copy of an online
layer like a wms or to take a work copy of an unsupported format
like an ECW or mrsid layer .

Thème de carte

A map theme . This is is is useful to create a base map base on a
combination of several layer with styling . These layer can then be
remove from the work package and do not need to be render on
the device . This is save 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
1×1 m, if it is set to 1000, each raster pixel will have a spatial
extent of 1 square kilometer.

Note

Base map generation is disabled on QFieldCloud. You can still manually add your basemaps by running « Generate XYZ tiles (MBTiles) » or « Convert map to raster » algorithms in the processing framework.

configuration de l’édition hors – ligne

If only synchronize feature 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

To package your project, click on Plugins > QFieldSync > Package for QField. Once the project is configured, proceed to package it into a folder. This folder will contain both the QGIS project file (.qgs) and the associated datum .

Premiers pasPackage the project for QField

Even though QFieldSync doesn’t display packaging options by default in the Toolbar panel, you can still access them through Plugins > QFieldSync > Preferences.

Premiers pasQFieldSync Preferences button

Simply activate the checkbox labeled « Show the packaging options in the toolbar. »

Premiers pasQFieldSync Preferences

copy the folder on your device . Open is open QField , open the project and start
collect datum .

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.

During packaging your project you can select which subdirectories to be copied by checking the directories in Advanced -> Directories to be copied.

Premiers pasSelect subdirectories

How to sync from/to iOS device without QFieldCloud

Use iTunes’ File Sharing function to import into the QField root folder.

  1. Open the iTunes app and click on the iPhone button near the top-left of the iTunes window.
  2. Click on the File Sharing option in the left sidebar .
  3. Select the app QField and click on Add File. This will open the file browser.
  4. Select the file.

Synchronize from 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.

Premiers pasSynchronize 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).