Usar anexo¶
No Qfield, um campo com um widget Anexo podem ser usado:
- Mostrar e tirar fotos
- mostrar e gravar vídeos
- ouvir e gravar clips de som
- mostrar ligações para ficheiros externos para documentos ou PDFs
To configure the Widget, please refer to the Attributes Form Documentation
Adicione uma série de fotos a um elemento¶
Preparação no Desktop
One or more pictures can be added to the feature. Here is an example of how to proceed.
Tabelas¶
It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.
Apiário¶
Campo | Tipo |
---|---|
id |
Texto (UUID) |
geometry |
Geometria |
... |
Apiario_fotos¶
Campo | Tipo |
---|---|
id |
Texto (UUID) |
apiary_id |
Texto (UUID) |
caminho |
Texto |
... |
Relações¶
Crie uma relação com:
apiary
Camada da referênciaid
Campo de referênciaapiary_picture
Camada da referênciaapiary_id
Campo de referênciastrength
Composição
Widgets¶
Apiário¶
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.
Define o widget de relação como muitos para uma relação e adiciona a relação ao formulário
Foto de apiário¶
Define o tipo de widget do campo com o caminho, como Anexo e adiciona-o ao formulário
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.
Etiqueta de Geolocalização¶
Trabalho de 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.
Fetching Geotags (EXIF) from the image file into the attribute table¶
Preparação no 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.
To store the EXIF information, follow these steps:
- Add an attribute per EXIF tag in the table that contains the pictures.
- 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.
- The EXIF tags that QField can capture are listed in the QGIS documentation (link above). 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.
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. - Completed! QField now captures and stores the EXIF tags in the pictures table while taking pictures.
Tamanho máximo da foto¶
Preparação no Desktop
As configurações avançadas permitem redimensionar as fotos para uma largura/altura máxima no Plugin QFieldSync > Configuração do projeto
Caminho configurável para os anexos¶
Preparação no Desktop
QFieldSync provides the possibility to configure the path and the file names of picture attachments.
- Go to *Layer Properties > QFieldSync plugin *
- Escolha a camada, o campo e configure a expressão
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.