アタッチメントを使う¶
QField では、Attachment ウィジェットを持つフィールドを使用できます:
- 写真の閲覧や撮影
- ビデオの表示と録画
- サウンドクリップを聴き、録音する
- PDFや書類のような外部ファイルのリンクを表示
ウィジェットを設定するには、属性フォームのドキュメントを参照してください。
地物に一連の写真を追加する¶
デスクトップの準備
One or more pictures can be added to the feature. Here is an example of how to proceed.
テーブル¶
It is necessary to set up two tables. One table where the features are stored and one with a list of pictures.
Apiary(養蜂場)¶
フィールド | データ型 |
---|---|
id |
テキスト (UUID) |
geometry |
ジオメトリ |
... |
Apiary_pictures(養蜂場の写真)¶
フィールド | データ型 |
---|---|
id |
テキスト (UUID) |
apiary_id |
Text (UUID) |
path |
テキスト |
... |
リレーション¶
リレーションを以下のように作成します:
apiary
参照レイヤid
参照フィールドapiary_picture
参照元レイヤapiary_id
参照元フィールドリレーションの強度
Composition
ウィジェット¶
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.
関係ウィジェットを 多対1リレーションに設定し、このリレーションをフォームに追加します。
養蜂場の写真¶
ウィジェットタイプを アタッチメント に設定し、フォームに追加します。
描画とスケッチ¶
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.
ジオタグ写真¶
フィールドマーク
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.
属性テーブルに画像ファイルからジオタグ(EXIF)を取得する¶
デスクトップの準備
Sometimes you might be interested in automatically storing Geotags such as the latitude, longitude, orientation, etc. This information is also known as EXIF tags.
EXIF情報を保存するには、以下の手順に従います:
- 写真を含むテーブルのEXIFタグごとに属性を追加します。
- 画像フォームで、各属性に対応するデフォルト値を設定します EXIF 式 QGIS EXIF関数を参照, 更新時に適用が有効になっていることを確認してください。
- QFieldが取得できるEXIFタグは、QGISのドキュメント(上記リンク)に記載されています。 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.
例えば、
exif(@project_folder + '/' + "path", 'Exif.Image.Orientation')
という式は、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.
最大画像サイズ¶
デスクトップの準備
詳細設定では、QFieldSyncプラグイン>プロジェクト設定で、写真を最大幅/高さに再スケーリングできます。
写真のパスの設定¶
デスクトップの準備
QFieldSync provides the possibility to configure the path and the file names of picture attachments.
- Go to *Layer Properties > QFieldSync plugin *
- レイヤ、フィールド名を選択し、表示名を定義します
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.