Aller au contenu

Utiliser les pièces-jointes

Dans QField, un champ avec le widget Pièce jointe peut être utilisé pour:

  • Visualiser et prendre des photos
  • Visualiser et enregistrer des vidéos
  • écouter et enregistrer des clips audio
  • montrer des liens vers des fichiers externes comme des PDFs ou d'autres documents

Attachments

Pour configurer le Widget, veuillez vous référer à la documentation sur les formulaires d'attributs.

Ajouter une série de photos à une entité

Préparation Desktop

One or more pictures can be added to the feature. Here is an example of how to proceed.

Tables

It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.

Rucher

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

Apiary_pictures

Champ Type
id Text (UUID)
apiary_id Text (UUID)
path Texte
...

Relations

Créez une relation avec:

  • Couche de référence apiary
  • Champ de référence id
  • Couche de référence apiary_picture
  • Champ de référence apiary_id
  • strength Composition

Relations

Widgets

Rucher

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

widgets

Définir le widget de la relation à many to one relation et ajouter la relation au formulaire

widgets

Photo du rucher

Définir le type de widget du champ path à Pièce jointe et l'ajouter au formulaire

widgets

Dessin et croquis

QField has an in-app drawing and sketching functionality enabling you to directly sketch over and annotate images captured while in the field as well as drawing on top of a blank canvas or over a template.

Modèles de croquis

On top of annotating captured images, QField supports drawing from image templates. The following two methods are available to add templates:

  • The first method is to create a drawing_templates folder located alongside a project file and populate it with images. Whenever that project is loaded, QField will register all images within that folder as drawing templates.
  • Alternatively, you can add images into the drawing_templates folder found inside your QField app folder. If you are not familiar with that app folder, its location is shown at the bottom of the About QField overlay.

Les modèles fournis par les dossiers projects et QField app s'affichent lorsque l'on clique sur l'option 'Dessiner un croquis', via le menu à 3 points du Widget de la pièce jointe.

picture path

Géolocalisation

Terrain

La caméra intégrée de QField géolocalisera automatiquement vos photos.

Les données sur l'emplacement et la direction des photos seront greffées au fichier de l'image.

Note

While with older Android versions it was possible to use other apps like the amazing OpenCamera app for taking pictures and preserving EXIF information from there, this is no longer with recent Android versions. Is recommended to disable Use native Camera in the settings to preserve EXIF information.

Récupération des Geotags (EXIF) des fichiers image vers la table attributaire

Préparation Ordinateur

Sometimes you might be interested in automatically storing Geotags such as the latitude, longitude, orientation, etc. This information is also known as EXIF tags.

Pour enregistrer les informations EXIF, procédez comme suit:

  1. Ajouter un attribut par tag EXIF dans la table qui contient les photos.
  2. Dans le formulaire des images, configurer la valeur par défaut de chaque attribut correspondant à l'expression EXIF Voir la function QGIS EXIF, et s'assurer que Appliquer par défaut à la mise à jour est activé.
  3. Les tags EXIF que QField peut capturer sont listées dans la documentation QGIS (lien ci-dessus). However, this list might slightly vary depending on the mobile characteristics.
  4. Capturing EXIF tags requires accessing the full physical path of the picture. Be sure to reflect this in the QGIS expression. Par exemple, l'expression exif(@project_folder + '/' + "path", 'Exif.Image.Orientation') récupère l'orientation de l'image stockée dans path. For more tags visit the QField EXIF reference documentation and the exiv library documentation.
  5. Completed! QField now captures and stores the EXIF tags in the pictures table while taking pictures.

Taille d'image maximale

Préparation Ordinateur

Les paramètres avancés permettent de redimensionner les photos à une largeur/hauteur maximale dans le plugin QFieldSync > Configuration du projet.

image

Chemin configurable des pièces jointes

Préparation Ordinateur

QFieldSync provides the possibility to configure the path and the file names of picture attachments.

  1. Go to *Layer Properties > QFieldSync plugin *
  2. Choisir la couche, le champ et configurer l'expression

Use expressions to specify the path of the attachments. By default, pictures are saved into the "DCIM" folder, audio are saved into the "audio" folder and videos are saved into "video" with a timestamp as name.

picture path

Additional directories can be synchronized with pictures or other attachments. Extra paths can be configured in Attachment directories in the QFieldSync settings under project properties. All paths are relative to the project directory.

attachments directories