The right query is that one:
{geom:get-x-coord()}
But he give no value because i give the template a line and not a point. How could i change the geometry type that i get all notes from a line?
Have you tried extracting coordinates into a list prior to the templater and then accessing those values within the query?
{
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")
for $i in (1 to fn:count($x))
return
<geometry> x="{$x[$i]}" y="{$y[$i]}" </geometry>
}
Have you tried extracting coordinates into a list prior to the templater and then accessing those values within the query?
{
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")
for $i in (1 to fn:count($x))
return
<geometry> x="{$x[$i]}" y="{$y[$i]}" </geometry>
}
If i use your code a bit edited:
{
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")
for $i in (1 to fn:count($x))
return
<geometry x="{$x[$i]}" y="{$y[$i]}"><line/> </geometry>
}
then my textfile is empty on this position.
If i use your code a bit edited:
{
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")
for $i in (1 to fn:count($x))
return
<geometry x="{$x[$i]}" y="{$y[$i]}"><line/> </geometry>
}
then my textfile is empty on this position.
Have you inserted the coordinate extractor prior to the xml templater so that the list exists?
Have you tried extracting coordinates into a list prior to the templater and then accessing those values within the query?
{
let $x := fme:get-list-attribute("_indices{}.x")
let $y := fme:get-list-attribute("_indices{}.y")
for $i in (1 to fn:count($x))
return
<geometry> x="{$x[$i]}" y="{$y[$i]}" </geometry>
}
k if i put an coordinate extractor before it works, but i want that he only put the nodes from the line into it. I have 3 lines with 2x 4 nodes and 1x 3 nodes and in summary 11. I want that he only set the nodes from the line and not every node.
<planView>
<geometry> x="534479.5085769484" y="5211763.0537863765"</geometry>
<geometry> x="534514.871573565" y="5211686.678654794"</geometry>
<geometry> x="534516.4251188312" y="5211683.3315199055"</geometry>
<geometry> x="534516.4251188312" y="5211683.3315199055"</geometry>
<geometry> x="534564.4075924826" y="5211708.18141793"</geometry>
<geometry> x="534566.2854240009" y="5211709.148064895"</geometry>
<geometry> x="534597.9922825961" y="5211730.102929116"</geometry>
<geometry> x="534412.9472988568" y="5211648.158671195"</geometry>
<geometry> x="534470.4027142564" y="5211663.538728009"</geometry>
<geometry> x="534515.3872750037" y="5211682.880969166"</geometry>
<geometry> x="534516.4251188312" y="5211683.3315199055"</geometry>
</planView>