Photo Attachments to Points

1234
8
Jump to solution
02-09-2021 11:09 AM
CristinHolmgren1
New Contributor
Does anyone know how to convert survey123 photo attachments (using the exif information) to points? Its confusing b/c we don't have direct access to these 'attachments' like we do to other related tables/features.  We are just looking for lat/long from exif since we didn't collect it in the survey as a field.
0 Kudos
1 Solution

Accepted Solutions
IsmaelChivite
Esri Notable Contributor

Thanks for the clarification. I would go like this: First export your survey layer into File Geodatabase format , and then run a script in either ArcGIS Pro or ArcMap to get your image files as described here:

Once you have the files, I would follow instructions here https://doc.arcgis.com/en/arcgis-online/manage-data/publish-features.htm#ESRI_SECTION1_C89E6F6E56B84... to create a new layer and then add the X Y Fields and calculate them.

For future work, if the requirement is to always persist photo metadata in fields, you will definitively need to add those additional questions with calculations to get data from the photo's EXIF.  If the survey must allow capturing more than one photo:

  • Add multiple image questions and their corresponding hidden questions to store metadata, if you plan to capture a small number of photos per survey: 2 or 3.
  • Add a repeat if you need the user to upload many photos and add your image  plus metadata hidden questions within the repeat.

More detailed discussion about working with photos here: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-photos/ba-p/897907

View solution in original post

8 Replies
Alber_Verster
Esri Contributor

Hi Cristin,

 

Have you had a look at this blog post?

Working with EXIF image metadata in Survey123 for ArcGIS 

It provides very detailed information regarding the EXIF functionality in Survey123 and points to a sample survey you could use to test and practice on.

Some of the limitations are also mentioned, things like the photo question must not have its appearance set to multiline and that the device GPS button would appear in your camera view to capture accurate GPS coordinates when taking the photo.

Does this resources help you with your problem?

Regards

Alber

CristinHolmgren1
New Contributor

Thanks Alber!

This is a great blog post, and had we set it up like this before kickoff, we'd be in good shape.  Unfortunately, we didn't and while we can see the lat/long in the popup, we can't extract it in bulk (or at least I can't figure out how).  Maybe I'm missing something though.

0 Kudos
IsmaelChivite
Esri Notable Contributor

Hi.  I am not fully understanding what makes your Survey123 photo attachments 'different'. When you capture a photo from Survey123, it gets attached to your feature. You should be able to access the photo from the popup of your feature in a web map. 

In any event, if you want to create a point layer to represent the location of photos, refer to https://doc.arcgis.com/en/arcgis-online/manage-data/publish-features.htm#ESRI_SECTION1_C89E6F6E56B84...

You can also automatically store the X and Y coordinates of your photos as attributes, it you create a calculation using an XLSForm expression as shown here

typenamelabelcalculationbind::esri:fieldType
geopointlocationLocation  
imagephotoPhoto  
calculatedirDirpulldata("@exif", ${photo}, "GpsImgDirection")esriFieldTypeDouble
calculatelatLatpulldata("@exif", ${photo}, "GpsLatitude")esriFieldTypeDouble
calculatelonLonpulldata("@exif", ${photo}, "GpsLongitude")esriFieldTypeDouble

 

0 Kudos
CristinHolmgren1
New Contributor

Thanks Ismael.

This is all fantastic info - but the situation we have found ourselves in is a result of users switching gears on what they need from the survey thousands of photos later.  In hindsight, we would have put the pulldata functions in the survey to populate the table itself with the exif information before we started - and have done so for other surveys we've created.  Unfortunately, we didn't so are struggling to find a way to access the exif on the thousands of photos already collected.  I know we could go record by record and it does display in the popup, but that's no feasible for the amount of data that has been collected already. We tried creating a feature template and pulling the x,y data that way, and it works but it's record by record and consumes a ton of credits.  I tried to use this article, https://developers.arcgis.com/rest/services-reference/query-attachments-feature-service-layer-.htmbu... the 'returnmetadata' option doesn't show up on the Attachment Query page.

0 Kudos
amynflowers
New Contributor

To expand on the question posed by @CristinHolmgren1 , we have a Survey123 form that uses multiline for photo questions, based on our initial requirements this made the most sense. As requirements changed and evolved we find ourselves with 2,773 survey records and more than 20,000 photo attachments. We would like to extract the same information that can be accessed from a feature report or the pop-up into a file type that can be used to create a new point feature class, say .csv. We could create a feature report and copy and paste from a Word document but that isn’t an efficient workflow and would consume credits.

0 Kudos
IsmaelChivite
Esri Notable Contributor

Thanks for the clarification. I would go like this: First export your survey layer into File Geodatabase format , and then run a script in either ArcGIS Pro or ArcMap to get your image files as described here:

Once you have the files, I would follow instructions here https://doc.arcgis.com/en/arcgis-online/manage-data/publish-features.htm#ESRI_SECTION1_C89E6F6E56B84... to create a new layer and then add the X Y Fields and calculate them.

For future work, if the requirement is to always persist photo metadata in fields, you will definitively need to add those additional questions with calculations to get data from the photo's EXIF.  If the survey must allow capturing more than one photo:

  • Add multiple image questions and their corresponding hidden questions to store metadata, if you plan to capture a small number of photos per survey: 2 or 3.
  • Add a repeat if you need the user to upload many photos and add your image  plus metadata hidden questions within the repeat.

More detailed discussion about working with photos here: https://community.esri.com/t5/arcgis-survey123-blog/survey123-tricks-of-the-trade-photos/ba-p/897907

CristinHolmgren1
New Contributor

Thank you!  I ended up creating a replica since the Export to FGDB didn't seem to like the sheer size of the date (ended up being like 18GB).  These steps did work and we will set up the Survey to collect the exif data in the table itself next time. 

0 Kudos
amynflowers
New Contributor

Thank you for your quick response @IsmaylaBA . I will try the recommended steps provided for our immediate need and make sure to calculate the EXIF data in the survey moving forward. 

0 Kudos