Survey123 coordinate transformation?

315
1
12-19-2019 07:28 AM
ChandlerCallison
New Contributor III

I've created a survey to keep track of hydrant painting in our district. The survey is opened through a link in a Collector popup. There are lat/long values on each hydrant that are passed to the survey through the custom URL so that the survey record shows up exactly on top of the hydrant point. The problem is, the survey record shows up about 3 feet from the hydrant, even though the lat/long values are the same. I imagine this is due to differences in coordinate system between Survey123 and the hydrants. The lat/longs on the hydrants were calculated in Desktop in NAD 1983 State Plane coordinate system. What do I need to do to get the survey results to show up in the correct location?

0 Kudos
1 Reply
DougBrowning
MVP Notable Contributor

123 is always WGS84 I think since your tablet is WGS84.  I have the same issue.  What I do is just make a lat/long static field and calc it in.  I do this because we want to know if anyone moves it.  You may be able to change 123 to use a diff map but I think anytime you as what is my GPS it will always be 84.

But I also have the code for Arcade to create them dynamically.   That way if a point ever moves it auto changes the lat/long.

var originShift = 2.0 * PI * 6378137.0 / 2.0;
var lon = (Geometry($feature).x / originShift) * 180.0;
var lat = (Geometry($feature).y / originShift) * 180.0;

lat = 180.0 / PI * (2.0 * Atan( Exp( lat * PI / 180.0)) - PI / 2.0);

return lon + "  " + lat;