Aller au contenu

Use pictures

In QField a field with Attachment widget can be used to: - Visualiser et prendre des photos - Visualiser des liens vers des fichiers externes comme des PDF ou des documents

To configure the Widget, please refer to the Attributes Form Documentation

Ajouter une série de photos à une entité

Desktop preparation

You can add one or more pictures to a feature. Here is an example on how to proceed.

Tables

You will need two tables. One table where the features are stored and one with a list of pictures.

Apiary

Field Type
id Text (UUID)
geometry Géométrie
...

Apiary_pictures

Field Type
id Text (UUID)
apiary_id Text (UUID)
path Text
...

Relations

Créez une relation avec:

  • apiary Referenced layer
  • id Referenced field
  • apiary_picture Referencing layer
  • apiary_id Referencing field
  • strength Composition

Relations
Relations

Widgets

Apiary

Set the default value of the field id to uuid() or use the UUID Generator widget. No need to show it in the form.

widgets
widgets

Set the relation widget to many to one relation and add the relation to the form

widgets
widgets

Apiary picture

Set the widget type of the field path to Attachment and add it to the form

widgets
widgets

Géolocalisation

Fieldwork

Certains appareils mobiles nécessiteront l'installation d'Open Camera afin de permettre la géolocalisation.

Pour activer la géolocalisation, suivez les étapes suivantes :

  1. In QField, go to the settings and make sure Use native Camera is activated
  2. Install the Open Camera app on your mobile device
  3. Dans les paramètres d'Open Camera, assurez-vous que la géolocalisation est activée
  4. Dans les paramètres de votre appareil mobile, réglez l'application par défaut de l'appareil photo sur Open Camera
  5. Terminé ! Open Camera sera désormais utilisé pour prendre des photos avec QField

Maximum picture size

The maximum height and width can be configured in QFieldSync plugin > Project configuration

image

The advanced settings allow to rescale the photos to a maximum width/height.

Chemin vers l'image configurable

Desktop preparation

QFieldSync gives the possibility to configure the path of picture attachments.

  1. Go to QFieldSync plugin > Project configuration
  2. Selectionner la table "Nomination de la photo"
  3. Choisir la couche, le champ et configurer l'expression

Use expressions to configure the path of the attachments. By default, pictures are saved into the "DCIM" folder with a timestamp as name.

picture_path
picture_path

Note

QGIS 3.14 or newer is required for this functionality