I'm using the QGIS ImportPhotos plugin to import photos taken on an iPhone and the coordinates of each photo displays as points based on the lat/long as expected.

However what I would like to do is display the direction each photo was taken in using a simple arrow. I believe that the direction information is recorded by the iPhone geotagging based on this response: https://stackoverflow.com/questions/3930266/what-information-is-stored-in-efix-jpeg-photos-taken-on-the-iphone-with-geotaggi

However when I look at the data the only direction attributes that come through is the Azimuth - is there anyway this can easily be converted to North or is the direction data not included in the data that the plugin collects from each photo?

1 Answer 1


What does the azimuth data look like? Is it reading something like this:


I took a few photos with my own iPhone. All of my azimuth data was reading like this. So I tried the most obvious thing and divided 24052 by 291 and it gave me a realistic answer (82.9°). With this in mind I went and took more photos at different orientations and again dividing gave me an expected result.

So from there you want to assign an arrow svg symbol to the data and apply a rotation and select edit.

enter image description here

Enter the following line. Basically it splits the azimuth string up before and after the '/' and then divides the two.

left("Azimuth"  , strpos("Azimuth"  , '/')-1)/(right("Azimuth"  , strpos("Azimuth"  , '/')-3))

as such.......

enter image description here

And you should end up with something like this: enter image description here

Some caveats:

  1. I can't confirm that the azimuth format is correct. It could of course be blind luck that my calculations actually match the orientation of my phone.
  2. Don't trust the iPhone compass. It is highly sensitive to interference.
  3. Even if you use location services and set your compass to True North in the Settings App I don't know if the camera on your iPhone records true or magnetic.
  • Thanks for the detailed response. When importing the photos via the ImportPhotos plugin the Azimuth data comes through on the attribute table as a single number (eg 24052) and doesn't have a number to divide by (eg 291 in your example).
    – user107128
    Aug 1, 2018 at 9:49

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.