I wish to extract exif metadata (lat and long) from pictures taken and uploaded to a feature service on AGOL from a Survey123 form. I know I can do this directly in the XLSForm by using the pulldata("@exif") function, but I would prefer not adding more columns to my table (plus, the number of pictures that a user can take is multiple so I don't know how I would deal with the ensuing unknown multiple coordinates).
So I was thinking more of extracting the exif metadata with arcade (either in map viewer or dashboard), with attachments(value).exifInfo in a loop. I'm able to retrieve other metadata (name, id, contentType, and so on), but exifInfo seems to always be empty.
Searching a bit, I stumbled upon this thread which is based on HEIC format pictures. I thought this could be my case too, because workers on the field use iPads. However, I just tried sending out a form with a picture taken on an Android device and I have the same problem.
When I download the pictures (either taken from Android or iPad/iOS) from AGOL to my computer, the location is indeed present in the metadata. So my guess is i'm not using the attachments() function correctly.
For other metadata I do:
var features = [];
var att = attachments(e); //where e is $feature or is another var from a loop in a layer/table
if (count(att) > 0) {
for (var a in att) {
push(features, att[a].name) //works
//push(features, att[a].exifInfo) >> always empty
//also tried looping through att[a].exifInfo or manually att[a].exifInfo[0], att[a].exifInfo[1] and so on...
}
return features;
Any idea what i'm doing wrong?
Thanks for your help!