Zum Inhalt

QFieldCloud System Dokumentation

Das Ziel dieses Dokuments ist es, einen Überblick über das QFieldCloud-System zu geben, um die zugrunde liegende Logik und Technologie zu verstehen.

Einheiten und Konzepte

QGIS Projekt

Im QFieldCloud-Kontext bezieht sich ein Projekt auf alle Datendateien, die für ein korrekt funktionierendes QGIS-Projekt erforderlich sind. Lies mehr über QGIS-Projekte.

Layer Aktion

Jeder Layer im QGIS-Projekt kann mit einer "Layer Aktion" konfiguriert werden. Die Aktion bestimmt, wie QFieldSync und QField den Layer behandeln sollen.

There are the two actions that can be configured: cloud action and cable action. They work in the QFieldCloud and traditional cable export context respectively.

Die folgenden Aktionen sind verfügbar und werden im Folgenden näher erläutert:

Name wird in der Benutzeroberfläche angezeigt Arbeitsmodus Geometrietyp
Offline Bearbeiten Cloud & Kabel Vektor
Direkter Zugriff auf Datenquelle Cloud & Kabel Alle
Aus Projekt entfernen Cloud & Kabel Alle
Kopieren Kabel Alle
Existierendes behalten (Kopieren wenn fehlend) Kabel Vektor

Cloud action configuration

The cloud action set in QFieldSync is applied by QFieldCloud only at the moment of packaging a project for QField.

This is the behavior of QFieldCloud (libqfieldsync) with the layers:

Aktion Dateibasierter Layer Service-based layer (e.g. WMS) Datenbank Layer (Postgres)
Offline Bearbeiten Erstellung einer konsolidierten Kopie der Daten beim Pull, Anwendung der Deltadatei auf die ursprüngliche Datenquelle beim Push. N/A Create a consolidated copy of the data on pull, apply delta file on push to original data source
Direkter Zugriff auf Datenquelle Create a read-only copy in an individual GeoPackage Keine Aktion für den Layer Keine Aktion für den Layer
Aus Projekt entfernen Entfernt den Layer aus dem Projekt Entfernt den Layer aus dem Projekt Entfernt den Layer aus dem Projekt

In summary, with QFieldCloud:

  • Offline editing means that a offline copy of the data will be generated by QFieldCloud and downloaded to QField. The data from Offline editing-layers will all be stored as multiple layers within a single data.gpkg. Whenever a modification is made on QField, a JSON structure called a Change (or Delta) will be generated only for the features that have been modified, only for the attributes or the geometry that have been modified. On push, the original data source will be updated, including the database for database layers.
  • Directly access data source is mainly used for service-based layers that are located on a internet accessible server. The data in these layers are directly modified by QField. Examples are WFS, WM(T)S-layers or layers coming from a database such as PostGIS layers. If the layer is file-based it will be in read-only mode.
  • Remove from project will simply remove the layer from the project (not package it for QField).

With QFieldSync in QGIS it will be possible to update a project already loaded on QFieldCloud.

In the event that the changes concern only styles, forms etc. but not the data or the structure of the layers, the QGIS project file (.qgs/.qgz) on the server will simply be updated.

If there are changes in the data or the structure of the layers, then the new data source files will be updated.

Note that changing the structure (or schema) of the layers such as adding, removing or renaming attributes, changing not null constraints, etc. might have effects. If such changes are pushed to QFieldCloud, please make sure all QField users have pushed their changes in advance. Otherwise it might be impossible for QFieldCloud to apply these Changes/Deltas from older version of the QGIS project.

Behaviour of QField

Depending on the actions set for each layer in QFieldSync for QFieldCloud or Cable export, QField will act as follows:

Aktion Dateibasierter Layer Service-based layer (e.g. WMS, database) Notiz
Offline Bearbeiten Create and push a Change N/A
Direkter Zugriff auf Datenquelle Layer nur lesbar Edit the online database
Aus Projekt entfernen N/A N/A Layer ist nicht verfügbar in QField
Kopieren Erstellen und nur lesbar N/A
Existierendes behalten (Kopieren wenn fehlend) Erstellen und nur lesbar N/A

Technical names for actions

The technical names for the available actions in QFieldSync are:

Name wird in der Benutzeroberfläche angezeigt Interner Name der Aktio
Offline Bearbeiten OFFLINE
Direkter Zugriff auf Datenquelle NO_ACTION
Aus Projekt entfernen ENTFERNEN
Kopieren KOPIEREN
Existierendes behalten (Kopieren wenn fehlend) EXISTIERENDEN_BEHALTEN

Anwendungsfälle

Offline-Bearbeitung im Feld, QFieldCloud ist mit der Datenbank verbunden

Hybrider Bearbeitungsmodus mit Synchronisation auf den Server

Hybrider Bearbeitungsmodus
Hybrider Bearbeitungsmodus

Offline-Bearbeitung im Feld, QFieldCloud ist nicht mit der Datenbank verbunden

Offline-Bearbeitungsmodus mit Desktop-Synchronisierung

Offline-Bearbeitungsmodus
Offline-Bearbeitungsmodus