Solved

How to create a good nested structure (geometry gml with xml templater)

  • 18 November 2017
  • 1 reply
  • 3 views

Badge

Hi,

Very hard question to post here :

I work on a project to write AIXM5.1 AirspaceTimeSlice. In the writer, i have a field [xml_geometry ] : Surface.

Inside this field i can found <gml: geometricLineString> nested structure, <gml:arcbycenter> nested structure in different positions. ( Not known when i read the feature ).

When i read the feature in FME, i'm able to recognize an arc and put in an XML templater the definition of this geometry in gml fields.

But i don't succeed to write the <geometricLineString > définition.

It shall contain <posList > éléments of each point defining the IFME Line. e.g :

<posList> Long(A) Lat(A) Long(B) Lat(B).....Long(k) Lat(k) </posList>

I have the points in a list :

Long {0} A

Lat {0} A

.....

I don't succeed in writing after the whole structure Surface by combining the different parts ( the order is random )

icon

Best answer by takashi 18 November 2017, 23:04

View original

1 reply

Userlevel 2
Badge +17

Assume the lists Long{}.A and Lat{}.A contain the coordinates to be listed within the "posList" element, this is a possible expression to generate the required element.

<posList>{
let $lat := fme:get-list-attribute("Lat{}.A")
for $x at $i in fme:get-list-attribute("Long{}.A")
return ($x, $lat[$i])
}</posList>

Reply