Output non-WGS84 coordinates in survey

219
3
Jump to solution
06-23-2021 03:06 PM
elpinguino
Occasional Contributor

Hi S123 Community,

Goal

Output coordinates in New Zealand Trans Mercator (collected through geopoint in the S123 form) via the report template, which would then be sent out automatically to the signee using Integromat.

Context

Field workers will be taking the form offline. They will mark a point where water is, using the geopoint question. I have gotten the basemap offline. So far so good. The field workers are in New Zealand though and require the coordinates to appear in the report in numerical format in NZTM, not as a point in the map and not in WGS84. From what I can tell, there are only select coordinate systems that S123 uses. 

Is there any way to output the coordinates in NZTM? I have figured out how to grab the coordinates in WGS84 into the report.

elpinguino_0-1624485589496.png

If there's not, does anyone have any work around or suggestions to get to the goal? I've thought about trying to convert from WGS84 to NZTM using calculations in S123, but I am still new to S123 and don't have much experience with projections. I normally would convert via online converters or using tools in Arc, so I don't know the actual manual way of doing it. I prefer not to do it either of these two ways though because we want to have the process automated from signing straight to sending a copy of the form to the signee's inbox.

This post also asks when S123's geopoint feature will use non-WGS84 coordinates.

0 Kudos
1 Solution

Accepted Solutions
Philip-Wilson
Esri Frequent Contributor

Hi @elpinguino,

The only way to achieve this in the survey on the device is to use a custom JavaScript function. If you are able to write a JS function that takes the coordinates from the geopoint in WGS84 and then converts to NZTM, you can then store the output in a text field in the survey. This text field can then be displayed in the feature report.

Alternatively you could do the conversion on the feature layer, using a post submission python script or geoprocessing tool, to update additional fields in the feature layer with NZTM coorindates taken from the geometry of that layer.

Regards,

Phil.

View solution in original post

0 Kudos
3 Replies
Philip-Wilson
Esri Frequent Contributor

Hi @elpinguino,

The only way to achieve this in the survey on the device is to use a custom JavaScript function. If you are able to write a JS function that takes the coordinates from the geopoint in WGS84 and then converts to NZTM, you can then store the output in a text field in the survey. This text field can then be displayed in the feature report.

Alternatively you could do the conversion on the feature layer, using a post submission python script or geoprocessing tool, to update additional fields in the feature layer with NZTM coorindates taken from the geometry of that layer.

Regards,

Phil.

View solution in original post

0 Kudos
elpinguino
Occasional Contributor

Hi @Philip-Wilson ,

Thanks for your reply. I think the first option is going to be too hard. Figuring out a formula for how to convert WGS84 to NZTM is beyond me.

The second option you suggest, that's not possible to do in an automated workflow is it? The form would have to be signed, then I'd have to go into the feature layer, run the geoprocess, export the report and then send it off.

0 Kudos
Philip-Wilson
Esri Frequent Contributor

Hi @elpinguino,

It may be possible to automate this workflow using webhooks (via Survey123 webhooks or feature service level webhooks) to trigger the needed geoprocesses and and export the report and send it off. You would need to look at ways in your workflow you can automate the geoprocessing part, the rest of the workflow is easy with existing webhooks.

Regards,

Phil.