Skip to main content
Question

Retain trailing zero on coordinate value in text editor


georgiec
Contributor
Forum|alt.badge.img+4

I’m building a value for the Longitude of a point feature.

 

The field type I have defined is number (20,6)

 

I create the value using this in the text editor:   @Format(%.5f,@XValue())

So I want 5 decimal places.   eg.     15436225.30510

However, what I see in my result table viewer is 15436225.3051   (no trailing zero)

But when I double click on that value, it displays the value “with” the zero.  15436225.30510

 

The value that gets written to the writer (to AGOL) is the one without trailing zero.

Works fine until I use a change detector, then it decides that the trailing zero is causing a difference and wants to update the value to have the trailing zero.

So my question is,  can I enforce the trailing zero in the table result?  Then I will rewrite my destination records one time again and hopefully my change detector will realise they are the same from that point on.  

 My original format statement again is :  @Format(%.5f,@XValue())

2 replies

crutledge
Influencer
Forum|alt.badge.img+34
  • Influencer
  • July 12, 2025

Hi ​@georgiec I wonder here if it is a case of setting the precision of the Field in your AGOL Feature Class. If you need 5 digits after the decimal point, then add a precision of 5 or 6 to the number of known digits before the decimal. In your example 15436225 = 8 and .30510 = 5 so a total precision of 13? (I think?). 
Example:
Not defined.
123.12345 » 123.12345
123.12340 » 123.1234
Defined: Precision of 8
123.12345 » 123.12345
123.12340 » 123.12340
On paper 123.12340 = 123.1234 but in the digital world 123.1234 could be hiding some rounding etc right? Which I think is the concern here?
I might be way off here but I hope that helps.


hkingsbury
Celebrity
Forum|alt.badge.img+56
  • Celebrity
  • July 13, 2025

I feel like this might be a bug where two parts of FME are fighting against each other. (ones saying pad it to X dp, the other is saying, well 0 at the end of a decimal isn’t needed, so drop it)

You should be able to convert it to a string and at the DP there. Don’t worry about it being a string, as the writer should fix it up correctly when its written

 

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings