Custom Geocoder to Geopoint - Different WKID

1031
2
Jump to solution
07-06-2023 03:43 PM
Caitlin_Todd_LCOR
New Contributor III

Hi all, 

I'm hoping there's an easy solution to this. I'm building a public-facing survey for emergency responses. In  the survey the public will be looking up their address via a custom address locator in a geocode type question. For x & y reasons, the public won't be allowed to look up their address in a map interface. So I'm hoping to use the pulldata function to glean the coordinates from the custom address locator and push them into a geopoint question so a point is created in the correct location.

But it's not updating the geopoint question and the survey points are getting put at 0,0 off of Africa.

address_lookup.jpg

But if I manually change the lat/long questions to something in decimal degrees, it works.

address_lookup_manual.jpg

My custom address locator is in WKID 2914 with international feet as the units, which isn't an option in the Survey123 Connect --> Map tab --> Coordinate Format list. 

My current question calculations are:

  • long: pulldata("@json",${address},"attributes.X")
  • lat: pulldata("@json",${address},"attributes.Y")
  • location: concat(number(${lat})," ",number(${long}))

Published to AGOL with Survey123 connect V3.14.261

Is there a way to change the Geopoint question WKID or to maybe convert on the fly to WKID 2914? I'd like to be able to use my custom address locator to avoid AGOL credit costs and still be able to push it into a geopoint question.

I've attached this section of my survey XLS.

Thanks for all your help, 

Caitlin Todd

Lane County GIS

0 Kudos
1 Solution

Accepted Solutions
JamesTedrick
Esri Esteemed Contributor

Hi, the issue in your example is where you are retrieving the x & y values.  In your example, the values are retrieved from the attributes of the geocode result; these are values stored in the geocode table/index and are not altered based on the request input.  Instead, you should be retrieving the values from the location object, which is reprojected as part of the request made by Survey123.  The attached file shows this difference.

View solution in original post

0 Kudos
2 Replies
JamesTedrick
Esri Esteemed Contributor

Hi, the issue in your example is where you are retrieving the x & y values.  In your example, the values are retrieved from the attributes of the geocode result; these are values stored in the geocode table/index and are not altered based on the request input.  Instead, you should be retrieving the values from the location object, which is reprojected as part of the request made by Survey123.  The attached file shows this difference.

0 Kudos
Caitlin_Todd_LCOR
New Contributor III

Hi James, thanks so much!! That solved it!

0 Kudos