Skip to main content

I have a problem to calculate the heading of 2 points in a line in my template. In the 2 pictures you can see the template itself there i tried to take the start y-value.I used atan2 and also just a simple number. I tried with just 2 and 1 and i get a solution, but not if i use the attribute with "{geom:get-start-y()}".

Hope i get some help.

Try using a FME Feature function rather than an XQuery function, e.g.

hdg="@atan2(@YValue(),1)"

Try using a FME Feature function rather than an XQuery function, e.g.

hdg="@atan2(@YValue(),1)"
It works ! Simple but i tried it 2 hours ;)

 

 

Thank you!

 

 


Try using a FME Feature function rather than an XQuery function, e.g.

hdg="@atan2(@YValue(),1)"
Just for your information. The "math:atan2" in XQuery Math Functions can also be used. Note: the namespace should be declared before the expression.

 

declare namespace math="http://www.w3.org/2005/xpath-functions/math";
<example hdg="{math:atan2(geom:get-start-y(),1)}" />