I am using FME 2021.2 with a PostGIS reader and an XML Templater and XML Formatter to write an XML output file. This works fine, but the coordinate X/Y output appears in scientific notation as below:
<Vertex>
<X>2.010340655257836E6</X>
<Y>6.7378739141772166E6</Y>
</Vertex>
I have tried all kinds of different things, however I can't get FME to format the output they way I want it like below:
<Vertex>
<X>2010340.655257836</X>
<Y>6737873.914177217</Y>
</Vertex>
This code fragment in the XML Templater works:
<Vertex>
<X>{geom:get-x-coord()}</X>
<Y>{geom:get-y-coord()}</Y>
</Vertex>
This does not:
<Vertex>
{
let $l := geom:get-x-coord()
let $r := @Format(%.2f,$l)
return $r
}
</Vertex>
I can't figure out how to pass the X value above into the format function, or find another workaround.