Skip to main content
Question

[SDF3 Writer] Number format not correct - 1e+031

  • May 3, 2013
  • 1 reply
  • 9 views

gpt_geoinfo
Contributor
Forum|alt.badge.img+2
Hi community,

 

 

I have a script which translates database content into an SDF3-file. Writer and Reader are dynamically. The Reader gets its schema from the writer.

 

Now I got the effect that numbers with the value "100" are converted into "1e+031" in the SDF3-file. Within the scipt everything works fine. "100" stays "100". All other numbers, too. They are also correct in the SDF3-file. It just concernes the 100's.

 

I already tried to set the attribute again to the value "100" and add an attribute to the Writer with a type 'decimal', without success.

 

 

Can anybody help me?

1 reply

david_r
Celebrity
  • May 3, 2013
Hi,

 

 

if your value "100" exits as "1e+31", then there is definitely a problem somewhere.

 

 

1e+31 equals 10000000000000000000000000000000, or ten thousand billion billion billion :-)

 

 

You could normally use a StringFormatter with format string like e.g. "16.0f" to convert from exponential notation to a decimal, but this won't work for such large numbers as they exceed the precision afforded by 64-bit floating point numbers (which I believe is used internally in FME).

 

 

Consider using an ExpressionEvaluator to scale the number down first, if you really need to work with such large numbers.

 

 

David

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