Skip to main content
Solved

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

  • November 18, 2017
  • 1 reply
  • 28 views

Forum|alt.badge.img

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 )

Best answer by takashi

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>
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

1 reply

takashi
Celebrity
  • 7843 replies
  • Best Answer
  • November 18, 2017

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>