Select to view content in your preferred language

Get coordinates of photo attachments for related table form in survey123

130
3
a week ago
ScumBagSurfer
Emerging Contributor

I have a relationship class between spatial polygons and a non-spatial table. I am performing inspections with survey123 where survey responses populate the non-spatial inspections table.

Within the form, users are able to attach a photo, is it possible to get the coordinates of the photo into a latitude and longitude field.

I have tried:

calculatelatLatpulldata("@exif", ${photo}, "GpsLatitude")esriFieldTypeDouble
calculatelonLonpulldata("@exif", ${photo}, "GpsLongitude")esriFieldTypeDouble

but that didn't work

0 Kudos
3 Replies
DuncanC
Frequent Contributor

I don't know why that wouldn't work for you.  I use this regularly in the exact same context without issue:

typenamelabelcalculationbind::typebind::esri:fieldType
hiddenimage_latPhoto Latpulldata("@exif", ${image}, "GpsLatitude")decimalesriFieldTypeDouble
hiddenimage_longPhoto Longpulldata("@exif", ${image}, "GpsLongitude")decimalesriFieldTypeDouble
0 Kudos
ScumBagSurfer
Emerging Contributor

This is my xls form:

Weirdly, latitude and longitude were calculated for the photo only when both Hazards = Yes and Incidents = Yes

typenamelabelappearancerequireddefaultcalculationfieldtypefieldlengthvisible
dateoperation_dateDate of Operation yestoday() esriFieldTypeDate  
textformated_operation_dateFormatted Date of Operationhidden  format-date(${operation_date},'%d/%m/%Y') esriFieldTypeString8000 
textpropertyPropertyhidden   esriFieldTypeString8000 
select_one hazardshazardsHazards yes  esriFieldTypeString8000 
texthazard_descriptionHazard Description yes  esriFieldTypeString8000${hazards}='Yes'
texthazard_responseHazard Response yes  esriFieldTypeString8000${hazards}='Yes'
select_one incidentsincidentsIncidents yes  esriFieldTypeString8000 
textincident_descriptionIncident Description yes  esriFieldTypeString8000${incidents}='Yes'
textincident_responseIncident Response yes  esriFieldTypeString8000${incidents}='Yes'
textoperation_commentsOperation Comments    esriFieldTypeString8000 
textproperty_idProperty IDhidden   esriFieldTypeGUID  
imagephotoAttach an image of the hazard/incidentmultiline      
calculatelatitudeLatitudehidden  pulldata("@exif", ${photo}, "GPSLatitude")esriFieldTypeString8000 
calculatelongitudeLongitudehidden  pulldata("@exif", ${photo}, "GPSLongitude")esriFieldTypeString8000 

 

0 Kudos
DougBrowning
MVP Esteemed Contributor

Is this an iPad maybe? 

If so make sure the photo settings are on Most Compatible vs High Efficiency.  It has issues getting coordinates when in High Efficiency.  

Also could be the photo app does not have location permissions?

Or it could be a iPad that is WiFi only?

Download the image and look at it in Windows to see if it has any lat/long in the exif at all.  If you attach a photo in windows or a something like that then it would not have GPS also of course.

0 Kudos