I am using the the following functions for extracting X and Y coordinates values from my geometry:
<COORD> <X>{geom:get-x-coord()}</X> <Y>{geom:get-y-coord()}</Y> </COORD>
This works well and I get something looking like this:
<?xml version="1.0" encoding="UTF-8"?> <TTSACTION TTSActionId="02A6F0EB5EF98599202DDC830A0000BB"> <CREATEROAD> <LINESTRING> <COORD> <X>4.123456</X> <Y>50.123456</Y> </COORD><COORD> <X>5.789456</X> <Y>49.789456</Y> </COORD><COORD> <X>5.123456</X> <Y>50.456123</Y> </COORD> </LINESTRING> </CREATEROAD> </TTSACTION>
However I need to multiply the X and Y values by 10000000 (otherwise I will not be in line with the XSD definitions).
I tried using the @double() function before multiplying the result by the constant but it is not supported, or at least not in the way I did it.
It would return the following without performing any calcualtion:
<?xml version="1.0" encoding="UTF-8"?> <TTSACTION TTSActionId="02A6F0EB5EF98599202DDE4B62000099"> <CREATEROAD> <LINESTRING> <COORD> <X>int(10000000*(double(geom:get-x-coord())))</X> <Y>int(10000000*(double(geom:get-y-coord())))</Y> </COORD><COORD> <X>int(10000000*(double(geom:get-x-coord())))</X> <Y>int(10000000*(double(geom:get-y-coord())))</Y> </COORD><COORD> <X>int(10000000*(double(geom:get-x-coord())))</X> <Y>int(10000000*(double(geom:get-y-coord())))</Y> </COORD> </LINESTRING> </CREATEROAD> </TTSACTION>
I must be overlooking something about the syntax.
Thanks in advance for your suggestions!
Best regards,
Olivier