QFieldSync¶
QFieldSync is the QGIS plugin, which you should use to "package" your projects for QField, which means to make your project available for QField. It is also this plugin you need to use when connecting to QFieldCloud.
QFieldSync will do the following:
- It packages your project into a 'QField readable' format (e.g.
portable_project
). - It (can) create(s) basemaps from a single raster layer or from a style defined in a map theme.
- It automatically sets your project to "offline editing".
- It is used to synchronize your changes made in the field to the Desktop project.
Flujo de trabajo¶
Para obtener una visión general rápida del proceso, aquí tiene una lista de pasos habituales:
- Crear un paquete QField. Se trata de una copia de trabajo en una carpeta.
- Copiar el paquete QField en el dispositivo de destino.
- Salir y recopilar los datos.
- Copiar los datos modificados de vuelta a su ordenador de escritorio.
- Sincronizar la información modificada con su base de datos o ficheros.
Instalación¶
- In QGIS direct to Plugins > Manage and install plugins.
- Search for "QFieldSync".
- Select the plugin in the list and click on "Install".
QFieldSync Settings¶
You will prepare your QGIS project depending on your requirements and save it as a .qgs
.
You can save it in a dedicated folder and use it repeatedly.
Layer Packaging¶
In the project configuration dialog, an "Action" you can define the behaviour of each individual layer. Depending on the layer type, different types of actions are available:
-
Copy: The layer will be copied to the package folder. This is only available for file-based layers.
-
No action: The layer source will be left untouched. This is only available for non-file-based layers like WMS, WFS or PostGIS layers
-
Offline editing: 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, this log will be replaced and all changes also be applied to the original source layer. There is no conflict handling in place.
-
Remove: The layer will be removed from the working copy.
Area of Interest and Basemap¶
When working offline, you have to add a raster layer or set a map theme to have a basemap when working in QField.
Note
The settings of this sections are not applicable when using QFieldCloud. Offline layers need to be prepared before the fieldwork.
Area of interest
When packaging your project for QField you can define an area of interest. When setting an area or a layer, only copy features intersecting this area of interest" will be 'packaged' when exporting the project to QField.
Basemap: A base map is a raster layer which is added as the bottom most layer to the packaged project file.
There are two possible options to set a basemap:
-
Single Layer: A raster layer is useful for taking 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.
-
Map Theme: A map theme is useful for creating 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.
Tile size
The tile size defines the spatial resolution meaning the number of map units per pixel. Eg. if the map canvas CRS has meters as units and you set the tile size is set to 1, each raster pixel will have a spatial extent of 1x1 m.
Zoom level:
By setting the minimum and maximum zoom levels you define the level of detail that you will see when zooming in and out.
- Nivel mínimo de zoom de los mosaicos: define el nivel de zoom mínimo para los mosaicos rasterizados. Un valor más bajo aumenta la cobertura espacial, pero la resolución espacial es limitada. (Predeterminado: 14)
- Nivel máximo de zoom de los mosaicos: define el nivel de zoom máximo para las teselas raster. Un valor más alto aumenta el detalle, pero puede requerir más espacio de almacenamiento, además de aumentar la duración de la exportación sin conexión. (Predeterminado: 14)
Additional Properties¶
There are some more advanced properties options which may bw relevant to you depending on your domain:
-
Permissions: Disable options for feature addition, feature deletion, attribute editing, or geometry editing.
-
Attachment default names: If you wish to save attachments within your data, you can modify the set default names. Please refer to How to configure your attachment path.
-
Maximum number of items available from a relation: When working with relations you can set the maximum number of items shown in the relation editor widget.
Configuring maximum items visibility for QField
Para ajustar el número máximo de elementos visibles en una relación dentro de QField, siga estos pasos:
-
Direct to Vector Layer Properties... > QField.
-
Under "Relationship Settings" set the "Maximum number of items visible".
Nota
- The default number is set to 4.
- If empty, the number is unlimited.
Empaquetar para QField¶
Once you are done with configuring your project, layers and styles you are ready to package your project.
-
Direct to Plugins > QFieldSync > Package for QField or click on the according symbol in the QFieldSync Toolbar.
-
Select the folders which also should be copied to QField.
By default, QFieldSync chooses the filepath for exporting a project. It is however possible to change those defaults by directing to Plugins > QFieldSync > Preferences.
In this window you can also manage whether the packaging options are shown in the QFieldSync toolbar.
-
To start working in QField, copy the whole folder on your device. Check the Storage section for the directory specification, depending on your system (Android, IOS, Windows).
Tip
Make 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.
Sincronizar desde QField¶
Once done with your collection, it is time to synchronize the data with your Desktop project.
- Re-open the project in QGIS (the one you saved with a regular Save As) previously.
- Copy the project folder from your device to your computer.
- Direct to Plugins > QFieldSync > Synchronize from QField menu to synchronize your changes from the QField project to the Desktop project.
Attention
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).