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 layerid
Referenced fieldapiary_picture
Referencing layerapiary_id
Referencing fieldstrength
Composition
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.
Set the relation widget to many to one relation and add the relation to the form
Apiary picture¶
Set the widget type of the field path to Attachment and add it to the form
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 :
- In QField, go to the settings and make sure Use native Camera is activated
- Install the Open Camera app on your mobile device
- Dans les paramètres d'Open Camera, assurez-vous que la géolocalisation est activée
- Dans les paramètres de votre appareil mobile, réglez l'application par défaut de l'appareil photo sur Open Camera
- 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
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.
- Go to QFieldSync plugin > Project configuration
- Selectionner la table "Nomination de la photo"
- 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.
It is also possible to synchronize additional directories with pictures or other attachments. Additional paths can be configured in Attachment directories. All paths are relative to the project directory.
Note
QGIS 3.14 or newer is required for this functionality