Use pictures¶
In QField a field with Attachment widget can be used to: - 写真の閲覧や撮影 - PDFや書類のような外部ファイルのリンクを表示
To configure the Widget, please refer to the Attributes Form Documentation
地物に一連の写真を追加する¶
Desktop preparation
You can add one or more pictures to a feature. Here is an example on how to proceed.
Tables¶
You will need two tables. One table where the features are stored and one with a list of pictures.
Apiary(養蜂場)¶
Field | Type |
---|---|
id |
Text (UUID) |
geometry |
ジオメトリ |
... |
Apiary_pictures(養蜂場の写真)¶
Field | Type |
---|---|
id |
Text (UUID) |
apiary_id |
Text (UUID) |
path |
Text |
... |
リレーション¶
リレーションを以下のように作成します:
apiary
参照レイヤid
参照フィールドapiary_picture
参照元レイヤapiary_id
参照元フィールドリレーションの強度
Composition
ウィジェット¶
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.
Set the relation widget to many to one relation and add the relation to the form
Apiary picture¶
Set the widget type of the field path to Attachment and add it to the form
ジオタグ写真¶
Fieldwork
一部のモバイル機器では、ジオタグ写真を有効にするためにOpen Cameraをインストールする必要があります。
ジオタグ写真を有効にするには次のように設定します。
- In QField, go to the settings and make sure Use native Camera is 有効になっていることを確認します。
- Open Camera アプリ を モバイル機器にインストールします。
- Open Cameraの設定で、ジオタグ写真が有効になっていることを確認します。
- モバイル機器の設定で、デフォルトのカメラアプリを「Open Camera」に設定します。
- 完了です! QFieldで写真を撮るときにOpen Cameraが使えるようになりました。
写真のパスの設定¶
Desktop preparation
QFieldSync gives the possibility to configure the path of picture attachments.
- Go to QFieldSync plugin > Project configuration
- 「写真の名前付け」のテーブルを選択します
- レイヤ、フィールド名を選択し、表示名を定義します
Use expressions to configure the path of the attachments. By default, pictures are saved into the "DCIM" folder with a timestamp as name.
Note
QGIS 3.14 or newer is required for this functionality