Sunday, 16 December 2018

geotag - how do I view geotagged photos and audio points in qgis mac?


How can I view geotagged photos and play audio files in qgis? For photos, HTML map tooltips used to work in qgis, but don't as of 2.18.2. For audio, I don't know of a solution.



Answer



On a Mac running QGIS 2.18.2, it is possible to setup a qgis action to open these two media types using the mac qlmanage (quicklook) application that is native to MacOS. For QGIS 3.6, there is a plugin that works great and doesn't need the quicklook action. see instructions below.


Install plugin:


Get your geotagged photos associated with a set of points. The Photo2Shape plugin works great for 2.18.2. For qgis 3.6 and greater use the ImportPhotos plugin. If you are using the KyngChaos packages and this plugin complains about exifread, download exifread and copy the 'exifread' folder to:


/Library/Python/2.7/site-packages/  (2.18.2)
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (3.6)


Usage 3.6:




  1. Click the import photos button on the toolbar, choose the folder, choose output shp and the point shp with linked photos should be created successfully.




  2. Use the 'Click Photos' tool to double-click the photo points to view photo.





Usage 2.18.2:


Once the shapefile is created and associated with the photos (and file paths), setup the action:



  1. double-click the layer to show layer properties

  2. Click 'Actions'. Add a new action (green plus sign).

  3. Setup a new 'Mac' action with the value:



qlmanage -p [%filepath%]




qgis action


Click apply, OK. Now, with the action tool, click on the point and the photo should load in a quicklook window. It's not technically integrated into qgis, but the functionality of the quicklook window and being able to close it with just a press of the spacebar makes it easy/fast to use.


qlmanage qgis photo display


Audio (2.18.2 only):


If you have points associated with audio files (or another kind of media the quicklook can display), you can load them as well:


setup the action:



  1. double-click the layer to show layer properties

  2. Click 'Actions'. Add a new action (green plus sign).

  3. Setup a new 'Mac' action with the value:




qlmanage -p [%filepath%]



alternatively, if you don't want to use qlmanage for audio (which requires you to hit the play button), you can use the built-in 'afplay' application. This will just play the audio file in the background after just a single click on the point with the action tool.



afplay [%filepath%]



No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...