One of our users wants to collect surveys with Survey123, save them as drafts and then store the results in local server since their clients do not want to have the information to be stored online. I have a survey which includes polygons and I have followed the instructions on how to extract the sqllite file form the mobile device.
However, I cannot find a way to convert this file into a format which is supported by Esri and even tried to open the sqlite file in ArcGIS Pro but its format seems to be incorrect since it comes out as empty tables. I am attaching the file to this post for your review.
James Tedrick can you help?
The sqlite DB structure used by Survey123 is internal to Survey123 and not directly supported other applications.
For point surveys, there is an existing script at GitHub - tedrick/ReadS123DB: Convert the survey data stored in the Survey123 Field App into a set of... that can export the database into a set of CSV files. I haven't had the time yet to update it to work with polygons/lines, however (the if block at line 39 would need to be extended to handle polygon and line shapes - rings & paths). If I were to take an initial stab at that, I would probably try to generate WKT that could then be imported.
We are looking to enhance data export support within the application in the future.
To start at an obvious place: Well-known text representation of geometry - Wikipedia
I would look for a 'rings' or 'paths' property instead of 'type' to determine line/polygons; you can then begin the string and iterate through the coordinates in the list to write out the values. Survey123 only supports simple (not multiple) geometries, so LINESTRING and POLYGON are the only types needed.
Hi James Tedrick,
Hope you had a great holiday season!
We are still stuck on going from csv with wkt to a format that's readable by ArcGIS Pro. I am able to bring it up in QGIS and see the geometry but not in any Esri software.
Also - is there a way to find out where the attachments (.jpg image files) are being stored? I found the \ArcGIS\My Survey Attachments folder but the images are not there.
Note: the survey I have completed in the Survey123 mobile app (Android) has not submitted and it is saved in the Drafts folder.
It does take a little bit of work to import a WKT directly; attached is a basic geoprocessing task/script to do so. Note that I had difficulty getting 3D coordinates parsed from. I did a quick adaptation by removing the 0 z coordinates; if you have 3D coordinates, this may be an issue. Another method would be to use the Data Interoperability extension.
Edit: attached the file
Thanks James Tedrick.
I will look into the tool.
Do you have any insights into my other question:
"is there a way to find out where the attachments (.jpg image files) are being stored? I found the \ArcGIS\My Survey Attachments folder on my mobile device but the images are not there."