2

Just wanted to know if it is possible to define the direction of taken photo? I took a lot of pictures with QFIELD (at my Phon) and I would like to know which direction has each Photo when I was taking it.

I only have x and y as attribute in a Point.shp.

3 Answers 3

4

It is possible to store the EXIF data using Qfield. You just need to configure a QGIS expression using the function exif(path, [tag]) Where path is an image file path and tag is the tag to return. For example, Exif.GPSInfo.GPSImgDirection returns the image direction. An empty tag will return a map with all exif tag values available for the phone and captured by this exif function.

Be sure the expression accesses the physical path of the picture. See more info at https://docs.qgis.org/3.28/en/docs/user_manual/expressions/functions_list.html?highlight=exif, and https://github.com/qgis/QGIS/issues/44199

1
  • Adding to my previous answer. Here is the link to the Qfield documentation (recently updated): Fetching Geotags (EXIF) from the image file into the attribute table - docs.qfield.org/how-to/pictures Dec 12, 2023 at 9:58
2

If you are using geotagged photos, see this link https://communityhealthmaps.nlm.nih.gov/2019/02/21/mapping-field-photos-in-qgis/

You can use the "Import geotagged photos" processing algorithm to extract the Azimuth EXIF field from photos, which contains the direction info you need. Once present as an attribute, you can use it as you need, including as a Data-driven override in the symbology of the photo layer on your map.

5
  • 1
    I've edited @Nelson Silva's answer to add the crucial steps as a paragraph, since links can go dead. This is a very useful answer, since the algorithm description in QGIS does not mention that direction is imported (though the user manual does!)
    – Houska
    Oct 16, 2020 at 11:36
  • Thank you for your reply. I tried the "Import geotagged photos", but it doesn't work. The direction column stay (null) empty. The pictures are taken through the QFIELD app in my mobile phone and the attributes are just x, y, label and comment. I created the shapefile very easily. I would have added a column with z ($ geometry) before I taked the photos.
    – Musaab
    Oct 16, 2020 at 12:46
  • In QField settings, activate Use Native Camera and try to install open camera app to create geotagged photos Oct 16, 2020 at 15:12
  • Thank you. it works very well with open camera. But is there any way to show the direction of old photos (i took them in QFIELD via my Phone Camera)?
    – Musaab
    Oct 20, 2020 at 8:31
  • I think that it is not possible. Just researching Oct 20, 2020 at 19:10
0

With the recent changes to Android, you may have difficulty attaching EXIF information to photos from the external app.

As a work-around, I suggest using the Input app: https://inputapp.io which is based on QGIS, available for Android and iOS and directly supports reading and writing EXIF data from/to photos.

Simply, set up a project in QGIS and add an expression as for the Default value:

read_exif_img_direction(@project_home + '/' + "photo")

This will write the photo direction to the field (assuming your photo field is called photo). You can also add lat, long and time stamp.

For more information how to set up the project and use it in Input app, see: https://www.lutraconsulting.co.uk/blog/2021/04/20/photo-exif-input/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.