Usa allegato¶
In QField, un campo con il widget Allegato può essere usato per:
- mostrare e scattare foto
- mostrare e registrare video
- ascoltare e registrare clip audio
- mostrare link a file esterni come PDF o documenti
Per configurare il Widget, fai riferimento al Documentazione Modulo Attributi
Aggiungi una serie di immagini a un elemento¶
Preparazione da Desktop
One or more pictures can be added to the feature. Here is an example of how to proceed.
Tabelle¶
It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.
Apiary¶
Campo | Tipo |
---|---|
id |
Text (UUID) |
geometry |
Geometria |
... |
Apiary_pictures¶
Campo | Tipo |
---|---|
id |
Text (UUID) |
apiary_id |
Text (UUID) |
path |
Text |
... |
Relazioni¶
Crea una relazione con:
apiary
Layer di riferimentoid
Campo di riferimentoapiary_picture
Layer che fa riferimentoapiary_id
Campo che fa riferimentostrength
Composizione
Widget¶
Apiary¶
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.
Imposta il widget della relazione su relazione uno a molti e aggiungi la relazione al modulo
Immagine dell'apiario¶
Imposta il tipo di widget del percorso del campo a Attachment e aggiungilo al modulo
Drawing and sketching¶
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.
Drawing templates¶
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.
Templates shipped alongside projects as well as the QField app folder will be shown when users choose 'Draw a sketch' within attachments widget's 3-dot menu.
Geotagging¶
Lavoro sul campo
QField's internal camera will automatically geotag your pictures.
Information about location and direction of the pictures will therefore be baked 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. Is recommended to disable Use native Camera in the settings to preserve EXIF information.
Recupero dei Geotag (EXIF) dal file immagine nella tabella degli attributi¶
Preparazione da Desktop
Sometimes you might be interested in automatically storing Geotags such as the latitude, longitude, orientation, etc. This information is also known as EXIF tags.
Per memorizzare le informazioni EXIF, attenersi alla seguente procedura:
- Aggiungi un attributo per ogni tag EXIF nella tabella che contiene le immagini.
- Nel modulo immagini, configurare il valore predefinito di ogni attributo per il corrispondente EXIF expression See QGIS EXIF function, e assicurati che Applica all'aggiornamento sia attivato.
- I tag EXIF che QField può catturare sono elencati nella documentazione di QGIS (link sopra). However, this list might slightly vary depending on the mobile characteristics.
- Capturing EXIF tags requires accessing the full physical path of the picture.
Be sure to reflect this in the QGIS expression.
Ad esempio, l'espressione
exif(@project_folder + '/' + "path", 'Exif.Image.Orientation')
recupera l'orientamento dell'immagine memorizzata in path. For more tags visit the QField EXIF reference documentation and the exiv library documentation. - Completed! QField now captures and stores the EXIF tags in the pictures table while taking pictures.
Dimensione massima dell'immagine¶
Preparazione da Desktop
Le impostazioni avanzate consentono di ridimensionare le foto alla massima larghezza/altezza in QFieldSync plugin > Configurazione progetto
Percorso dell'allegato configurabile¶
Preparazione da Desktop
QFieldSync provides the possibility to configure the path and the file names of picture attachments.
- Go to *Layer Properties > QFieldSync plugin *
- Scegli il layer, il campo e configura l'espressione
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 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.