Archive Calculate
Pictures

Pictures

2024-11-26 Use attachment In QField, a field with attachment widget can be used to : show and take photos show and record videos listen and record sound c

Related articles

How to Get a 7 & 30-day ExpressVPN Free Trial in 2024 Guide:Walkthrough Best Unblocked Browsers For School and Work AVG VPN Review in UK 2024: An In-Depth Analysis Natasha Best Builds and Teams How to Watch 2024 NFL in Brazil live online

Use attachment

In QField, a field with attachment widget can be used to :

  • show and take photos
  • show and record videos
  • listen and record sound clips
  • show links to external files like PDFs or documents

Pictures

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

Add a series of pictures to a feature

Desktop preparation

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.

Apiary

Field type
id text ( UUID )
geometry Geometry
...

apiary_picture

Field type
id text ( UUID )
apiary_id text ( UUID )
path Text
...

Relations

create a relation with :

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

Pictures

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.

Pictures

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

Pictures

Apiary picture

set the widget type of the field path toattachment and add it to the form

Pictures

draw and sketch

QField is have have an in – app drawing and sketch functionality enable you to directly sketch over and annotate image capture while in the field as well as draw on top of a blank canvas or over a template .

Geotagging

Fieldwork

QField ‘s internal camera is geotag will automatically geotag your picture .

information about location and direction of the picture will therefore be bake into the image file .

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.
If you enable use native Camera in the settings you is be will not be able to preserve EXIF information .

Desktop preparation

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

To store the EXIF information, follow these steps:

  1. add an attribute per EXIF tag in the table that contain the picture .
  2. In the pictures form, configure the default value of each attribute to the corresponding
    EXIF expression See QGIS EXIF function,
    and make sure apply on update is activated.
  3. The EXIF tags that QField can capture are listed in the QGIS documentation (link above).
    However, this list might slightly varies 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.
    For example, the expression exif(@project_folder + ' / ' + " path " , ' Exif . image . orientation ' ) retrieves the orientation of the picture stored in path. For more tags visit the QField EXIF reference documentation and the exiv library documentation.
  5. Completed! QField’s now capture and store the EXIF tags in the pictures table while taking pictures.

Maximum picture size

Desktop preparation

The advanced settings is allow allow rescale the photo to a maximum width / height inQFieldSync plugin > Project configuration

Configurable attachment path

Desktop preparation

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

  1. Go toQFieldSync plugin > Layers Properties
  2. Choose the layer, the field and configure the 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.

additional directory can be synchronize with picture or other attachment . extra path can be configure inattachment directories. All paths are relative to the project directory.

Pictures

Note

QGIS 3.14 or newer is required for this functionality