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:
calculate | lat | Lat | pulldata("@exif", ${photo}, "GpsLatitude") | esriFieldTypeDouble |
calculate | lon | Lon | pulldata("@exif", ${photo}, "GpsLongitude") | esriFieldTypeDouble |
but that didn't work
I don't know why that wouldn't work for you. I use this regularly in the exact same context without issue:
type | name | label | calculation | bind::type | bind::esri:fieldType |
hidden | image_lat | Photo Lat | pulldata("@exif", ${image}, "GpsLatitude") | decimal | esriFieldTypeDouble |
hidden | image_long | Photo Long | pulldata("@exif", ${image}, "GpsLongitude") | decimal | esriFieldTypeDouble |
This is my xls form:
Weirdly, latitude and longitude were calculated for the photo only when both Hazards = Yes and Incidents = Yes
type | name | label | appearance | required | default | calculation | fieldtype | fieldlength | visible |
date | operation_date | Date of Operation | yes | today() | esriFieldTypeDate | ||||
text | formated_operation_date | Formatted Date of Operation | hidden | format-date(${operation_date},'%d/%m/%Y') | esriFieldTypeString | 8000 | |||
text | property | Property | hidden | esriFieldTypeString | 8000 | ||||
select_one hazards | hazards | Hazards | yes | esriFieldTypeString | 8000 | ||||
text | hazard_description | Hazard Description | yes | esriFieldTypeString | 8000 | ${hazards}='Yes' | |||
text | hazard_response | Hazard Response | yes | esriFieldTypeString | 8000 | ${hazards}='Yes' | |||
select_one incidents | incidents | Incidents | yes | esriFieldTypeString | 8000 | ||||
text | incident_description | Incident Description | yes | esriFieldTypeString | 8000 | ${incidents}='Yes' | |||
text | incident_response | Incident Response | yes | esriFieldTypeString | 8000 | ${incidents}='Yes' | |||
text | operation_comments | Operation Comments | esriFieldTypeString | 8000 | |||||
text | property_id | Property ID | hidden | esriFieldTypeGUID | |||||
image | photo | Attach an image of the hazard/incident | multiline | ||||||
calculate | latitude | Latitude | hidden | pulldata("@exif", ${photo}, "GPSLatitude") | esriFieldTypeString | 8000 | |||
calculate | longitude | Longitude | hidden | pulldata("@exif", ${photo}, "GPSLongitude") | esriFieldTypeString | 8000 |
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.