Select to view content in your preferred language

Extract lat, lon from a geoshape

495
2
Jump to solution
10-06-2023 08:25 AM
ChipMorgan65
Occasional Contributor

Hi,

   I’d like to do a current weather lookup from lat/lon extracted from a geoshape. I’ve got the weather logic ready, but I don’t know how to extract coordinates from a geoshape. I don’t really care which vertex I pull them from. I just need one.

   I’m not interested in having the user select a geopoint in a separate question. I already have their location in the geoshape. I might have to use this as a fallback, but it’s not an effective use of the product or their time. 

   I’m also not interested in asking the user to build the geoshape vertex by vertex. It would slow them down, given the number of vertices the polygons would need. 

   Any ideas or guidance would be greatly appreciated. 

Chip

1 Solution

Accepted Solutions
ZacharySutherby
Esri Regular Contributor

Hello @ChipMorgan65

Unfortunately we don't support a pulldata("@geoshape") function at this time. We have an issue in our backlog to support functions extracting different information from a geoshape question. 

The only way to extract information from a geoshape at this time is to use a custom JavaScript function to process the vertices. I've attached a sample that will extract a single vertex (what vertex can be hard coded in the XLSForm). 

Thank you,
Zach

View solution in original post

2 Replies
ZacharySutherby
Esri Regular Contributor

Hello @ChipMorgan65

Unfortunately we don't support a pulldata("@geoshape") function at this time. We have an issue in our backlog to support functions extracting different information from a geoshape question. 

The only way to extract information from a geoshape at this time is to use a custom JavaScript function to process the vertices. I've attached a sample that will extract a single vertex (what vertex can be hard coded in the XLSForm). 

Thank you,
Zach
ChipMorgan65
Occasional Contributor

@ZacharySutherby,

   Thank you so much for this. I was hoping that this sort of scripting was available. And thanks for including an example XLSForm to test it with.

Much appreciated,

   Chip

0 Kudos