Geopoint Rounding in Feature Report

236
4
Jump to solution
06-24-2021 10:16 AM
TristonRice
New Contributor III

Is there a way to alter the default rounding when obtaining the lat/long of a geopoint question in a feature report? Anytime I pull lat/long in a feature report using this function ${geopoint | getValue: “y”} and ${geopoint | getValue: “x”} and it always rounds to the 5th decimal place. There are however some circumstances where we need it to 8 decimals. I understand the accuracy of the GPS on most mobile devices is really only accurate to the 5th decimal place, but I work for a state government agency that requires us to record this information to the 8th decimal place. 

0 Kudos
1 Solution

Accepted Solutions
TristonRice
New Contributor III

Hello Ruth, 

 

I ended up adding two hidden calculation questions in the survey that use the pulldata function to obtain the full-length Lat and Long from our geopoint question. From there I use the round function and can add the lat and long for 8 decimal places in our feature report. It was overall straightforward, and technically only added one more question to our survey. 

 

Thanks!

View solution in original post

0 Kudos
4 Replies
Waffle_House
Occasional Contributor

Have you looked through the docs: https://doc.arcgis.com/en/survey123/desktop/create-surveys/geopoints.htm#GUID-CC769D6B-B463-4F1F-893...

Even if you can force more decimal points it doesn't mean that the device is recording the position more accurately. 

0 Kudos
TristonRice
New Contributor III

Yes I have and trust me I understand the accuracy of the GPS on our mobile devices doesn't necessitate 8 decimal places, but unfortunately, it's what management wants. 

0 Kudos
Ruth_JiatengXu
Esri Contributor

Hi @TristonRice 

Thanks for sharing here. The ${geopoint | getValue: “x|y”} currently can only return the lat/long with 5 decimal places, and you cannot get more significant digits. However, there is one expression can pad zeros to the output number, if you use ${geopoint | getValue: “x|y” | toFixed:8} you will get the lat/long with 8 decimal places (5 significant decimal digits + 3 zeros).

We have discussed your use case with the team, and in the future release we will make the ${geopoint | getValue: “x|y”} to return original lat/long, and then you can use round or toFixed expression to format the output lat/long. I will reply to this post once the change is available for testing.

Thanks,

Ruth

TristonRice
New Contributor III

Hello Ruth, 

 

I ended up adding two hidden calculation questions in the survey that use the pulldata function to obtain the full-length Lat and Long from our geopoint question. From there I use the round function and can add the lat and long for 8 decimal places in our feature report. It was overall straightforward, and technically only added one more question to our survey. 

 

Thanks!

View solution in original post

0 Kudos