Skip to main content
Solved

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

  • November 18, 2017
  • 1 reply
  • 21 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>
View original
Did this help you find an answer to your question?

1 reply

takashi
Evangelist
  • 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>

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings