Skip to content

Commit

Permalink
exif, 1-N, links redesign
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-cit committed Sep 8, 2024
1 parent e99c286 commit e5511be
Show file tree
Hide file tree
Showing 23 changed files with 25 additions and 39 deletions.
9 changes: 3 additions & 6 deletions src/layer/attach-multiple-photos-to-features/index.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
# How to Attach Multiple Photos to Features

::: warning
Our mobile app was redesigned. We are in the process of updating this content to reflect these changes.
:::

In some situations, it might be useful to take more than one picture of a feature during the field survey. Attaching multiple photos to one feature is a 1-N relation. You can read more about 1-N relations and how they can be used in <MainPlatformNameLink /> in [How to link multiple records to one feature](../one-to-n-relations/).

<YouTube id="NCa_Nb_CYno" />

:::tip
:::tip Example project available
To see this setup in practice, you can download the following project:
<MerginMapsProject id="documentation/forms_multiple_photos" />.
:::
Expand Down Expand Up @@ -44,5 +41,5 @@ Now we need to configure a [1-N relation](../one-to-n-relations/):
7. Navigate to the **Attributes Form** tab in the **Properties** of the `photos` layer. Set the **Widget Type** of the foreign key `external-pk` to **Relation Reference**:
![Relation Reference widget in Attributes form](./qgis_relation_form.jpg "Relation Reference widget in Attributes form")

<MobileAppName /> detects the type of 1-N relation and displays the image viewer for the relations.
![Many photos to a single feature in Mergin Maps mobile app](./input_forms_many-photos.jpg "Many photos to a single feature in Mergin Maps mobile app")
The <MobileAppNameShort /> detects the type of 1-N relation and displays the image viewer for the relations.
![Many photos to a single feature in Mergin Maps mobile app](./mobile-multiple-photos.jpg "Many photos to a single feature in Mergin Maps mobile app")
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file removed src/layer/exif/gps_exif_metadata.jpg
Binary file not shown.
Binary file removed src/layer/exif/gps_exif_metadata.xcf
Binary file not shown.
30 changes: 14 additions & 16 deletions src/layer/exif/index.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# Exif Metadata
[[toc]]

::: warning
Our mobile app was redesigned. We are in the process of updating this content to reflect these changes.
:::

EXIF is a file format for storing metadata in image files, such as the camera settings, image metrics, date and time or location information (see, e.g., [Wikipedia](https://en.wikipedia.org/wiki/Exif)).

<MobileAppName /> supports some default value expression functions that can be used to read EXIF metadata and store their values in the fields of your survey layer.
The <MobileAppNameShort /> supports some default value expression functions that can be used to read EXIF metadata and store their values in the fields of your survey layer.

To store GPS EXIF metadata, both the <MobileAppNameShort /> and your camera app have [location permissions](#allowing-location-tags) allowed on your mobile device.

::: tip
## Allowing location tags
**Location tags have to be allowed** in the camera settings to store GPS EXIF metadata in the photos.

- **Android**: Open Camera app -> Camera settings -> Location tags.
![Allowing location tags in Android](./android_geo_tags.jpg "Allowing location tags in Android")

- **iOS**: Open Settings -> Privacy -> Location Services -> Camera (app).
![Allowing location tags in iOS](./ios_geo_tags.jpg "Allowing location tags in iOS")

## How to use EXIF metadata in Mergin Maps mobile app

::: tip Example project available
Clone <MerginMapsProject id="documentation/exif-metadata" /> to see how it works!
:::

## How to use EXIF metadata
To store EXIF metadata values in the fields of your survey layer:
1. In QGIS, open the **Properties** of your survey layer and navigate to the **Attributes Form** tab.
2. Now we need to set the [default values](../form-configuration/#default-values) of fields that should store EXIF metadata.
Expand All @@ -36,7 +42,7 @@ To store EXIF metadata values in the fields of your survey layer:
3. Save and sync your project.

4. Open the project in <MobileAppName />. Once you capture a photo during the field survey, the EXIF metadata values will be automatically filled in:
![Exif metadata in Mergin Maps mobile app form](./gps_exif_metadata.jpg "Exif metadata in Mergin Maps mobile app form")
![Exif metadata in Mergin Maps mobile app](./mobile-exif-metadata.jpg "Exif metadata in Mergin Maps mobile app")

## Supported EXIF functions
EXIF function supported by <MobileAppName />:
Expand All @@ -62,11 +68,3 @@ exiftool -n -S <PATH_TO_IMAGE>
However, keep in mind that the EXIF tag names that you get from ExifTool can differ from EXIF specification. To store EXIF metadata using <MainPlatformNameLink />, you have to use the latter.
:::

## Allowing location tags
**Location tags have to be allowed** in the camera settings to store GPS EXIF metadata.

- **Android**: Open Camera app -> Camera settings -> Location tags.
![Allowing location tags in Android](./android_geo_tags.jpg "Allowing location tags in Android")

- **iOS**: Open Settings -> Privacy -> Location Services -> Camera (app).
![Allowing location tags in iOS](./ios_geo_tags.jpg "Allowing location tags in iOS")
Binary file added src/layer/exif/mobile-exif-metadata.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/layer/exif/mobile-exif-metadata.xcf
Binary file not shown.
13 changes: 4 additions & 9 deletions src/layer/external-link/index.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# How to Use Hyperlinks
[[toc]]

::: warning
Our mobile app was redesigned. We are in the process of updating this content to reflect these changes.
:::

## Open link in a browser

1. Right-click on a layer, select **Properties** and go to the **Attributes form** tab.
Expand All @@ -26,7 +22,7 @@ Our mobile app was redesigned. We are in the process of updating this content to
![Hyperlink as default value in Attribute form](./qgis-link.jpg "Hyperlink as default value in Attribute form")

When you click on a feature in <MobileAppName />, the form will contain a clickable link.
![Hyperlink in Mergin Maps mobile app form](./input-link.jpg "Hyperlink in Mergin Maps mobile app form")
![Hyperlink in Mergin Maps mobile app form](./mobile-form-link.jpg "Hyperlink in Mergin Maps mobile app form")

## Open link to a navigation app

Expand All @@ -48,10 +44,9 @@ Let's say you want to find your surveyed features on Google Maps. It is possible

![Link to Google maps in QGIS Attributes form](./qgis-google-maps.jpg "Link to Google Maps in QGIS Attributes form")

When you click on a feature in <MobileAppName />, the form will contain a clickable link **Open Google Map**.
![Open Google map from Mergin Maps mobile app](./input-google-maps.jpg "Open Google map from Mergin Maps mobile app")
When you tap a feature in the <MobileAppNameShort />, the form will display a clickable link **Open Google Map** that opens the Google Map app at the position of the feature.

![Open Google map from Mergin Maps mobile app](./mobile-form-link-to-navigation-app.jpg "Open Google map from Mergin Maps mobile app")

Tapping the link opens the Google Map app, where you will see the position of your feature.

![Google maps opened at surveyed feature's position](./google-maps.jpg "Google maps opened at surveyed feature's position")

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file added src/layer/external-link/mobile-form-link.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/layer/external-link/mobile-form-link.xcf
Binary file not shown.
12 changes: 4 additions & 8 deletions src/layer/one-to-n-relations/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# How to Link Multiple Records to One Feature (1-N Relations)
[[toc]]

::: warning
Our mobile app was redesigned. We are in the process of updating this content to reflect these changes.
:::

:::tip
:::tip Example project available
You can clone these projects to take a closer look on 1-N relations:
- Assigning multiple inspections to a single feature: <MerginMapsProject id="documentation/forms_one-to-many-relations" />
- Adding multiple photos to a single feature: <MerginMapsProject id="documentation/forms_multiple_photos" />
Expand All @@ -15,7 +11,7 @@ It is often the case that you have a set of spatial features and you want to rec

The image below shows the manhole locations and a form with listed inspections in <MobileAppName />.

![Multiple inspections linked to one point in Mergin Maps mobile app](./input-1-n.jpg "Multiple inspections linked to one point in Mergin Maps mobile app")
![Multiple inspections linked to one point in Mergin Maps mobile app](./mobile-1-n-relation.jpg "Multiple inspections linked to one point in Mergin Maps mobile app")

The manhole point layer has the following attribute table:

Expand Down Expand Up @@ -76,7 +72,7 @@ Now you can add multiple inspections for each manhole location. The inspections
When you open the form for an existing record in the `manhole_locations` point layer, it will display existing inspection records and you can also add, delete or edit the records:
![Form view of a feature with 1-N relation in QGIS](./qgis-1-N-form.jpg "Form view of a feature with 1-N relation in QGIS")

In <MobileAppName />, the form will look like this:
In the <MobileAppNameShort />, the form will display all linked inspection records. Tapping the **+** button opens the inspection form and a new inspection record can be added.

![Form view of a feature with 1-N relation in Mergin Maps mobile app](./input_forms_one-to-n.jpg "Form view of a feature with 1-N relation in Mergin Maps mobile app")
![Form view of a feature with 1-N relation in Mergin Maps mobile app](./mobile-form-1-n-relation.jpg "Form view of a feature with 1-N relation in Mergin Maps mobile app")

Binary file removed src/layer/one-to-n-relations/input-1-n.jpg
Binary file not shown.
Binary file removed src/layer/one-to-n-relations/input-1-n.xcf
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit e5511be

Please sign in to comment.