Need to increase precision of floating point fields to 15 digits after decimal for latitude and long

pdurgapavan
Tera Contributor

I have two fields on the Location table called latitude and Longitude- both are floating point number fields.

By default the system allows up to 7 digits after the decimal point. if we are giving more than 7 digits value is rounding off.

But I would need to store the coordinated with 15 digits after the decimal point, and also need 4 digits before the decimal point. (including the '+', '-' sign)

 

Example latitude : -90.897845651232145

longitude: -180.321232126545987.

 

How can I modify these fields to store such high-precision floating values without rounding or truncation?

Could anyone please help me to achieve.

 

And one more thing I would like to tell you on the latitude field I turned on to advance view and on the attributes I gave scale=15 and maximum length I updated to 50. now it's taking 13 digits after decimal but if we are giving more than 13 digits then the value is truncating.

pdurgapavan_0-1752602491259.pngpdurgapavan_1-1752602540287.pngpdurgapavan_2-1752602591638.png

could anyone help me with the logic.

@Ankur Bawiskar 

@Dr Atul G- LNG 

@J Siva 

@GlideFather 

@Chaitanya ILCR 

@SANDEEP DUTTA 

5 REPLIES 5

Simon Hendery
Mega Patron
Mega Patron

Hi @pdurgapavan 

 

What's the use case here? I believe the loss of accuracy with GP S coordinates between 7 and 8 digits is +/- 1mm. I'm pretty sure that whatever location data you're storing, 7 digits will be more than adequate. 

Hello @Simon Hendery

 

Below is the sample data which we are getting. after decimal there are 13 digits

46.5580542801653

46.3129582685506

51.4542844955978

 

Hi @pdurgapavan 

 

The question is: if this is GIS (location) data, why do you need so many decimal points? Rounding to fewer places will still give you useable coordinates. 

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @pdurgapavan 

Agree with Simon here, any reason to make it 15 digit long? 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************