Part of my job is to analyze images in Arcgis Pro taken by a drone. I used the EXIF properties function from ArcPy to retrieve data from a DJI drone. Someone already helped me to get the properties for several images at once, and not one at a time (see https://stackoverflow.com/questions/73224313/how-to-use-arcpy-getimageexifproperties-for-more-than-one-image-at-a-time).
I have been trying, unsuccessfully, to extract the target longitude/latitude data and the gimbal yaw measurement for all images from the result of the previous function:
- the result comes as a dictionary, but the actual data are in a dictionary within a list within the general dictionary. Here is an example with the first image:
{'1_DJI_20220622210442_0015_T.JPG': [-95.78288447222222, 40.61787008333334, 284.564, {'width': 640, 'height': 512 … }]}
- the keys, associated with the actual data, have a colon in the name, and the values (coordinates and degrees) are float numbers: 'XMP:drone-dji:LRFTargetLon': '-95.7840195', 'XMP:drone-dji:LRFTargetLat': '40.6177254', 'XMP:drone-dji:GimbalYawDegree': '-99.40'
So, what would be the specific Python module and/or function/command to do the extraction?
Also, one goal is to create a shapefile containing fields (the keys as field names), attributes (the values as data), and records (all images are individualized). I found a series of video tutorials precisely on that topic in Youtube, but feel free to express your ideas, I could use your help.
The other goal is to create a tool in Arcgis Pro that will make the extraction and shp file creation process automatic. I have sometimes hundreds of images to process at once. If you think it is possible to create such a tool, please let me know as well.