Skip to main content
Solved

Generate GML for a single feature ?

  • March 25, 2020
  • 3 replies
  • 30 views

lifalin2016
Supporter
Forum|alt.badge.img+40

Hi list.

I'm tasked with creating an XML, that is compromised from many different sources (database tables/views). I'm plannning to use a number of XmlTemplater's to accomplish this.

But each feature from some of these sources is represented in the final XML as a bit of GML wrapped in special tags.

FeatureWriter will collect all input features into a single GML file. This is not what I want.

Is there a way to make FME output the GML representation for each feature ?

Cheers.

Lars I.

Best answer by virtualcitymatt

You can fan out features but adding an attribute name into the path field

 

 

C:\\data\\GMLFiles\\@Value(FileName).gml
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.

3 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+47

You can fan out features but adding an attribute name into the path field

 

 

C:\\data\\GMLFiles\\@Value(FileName).gml

lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • March 26, 2020

You can fan out features but adding an attribute name into the path field

 

 

C:\\data\\GMLFiles\\@Value(FileName).gml

Hmm. I want the GML values in-stream, as an attribute, but I suppose I could have the workflow write separate temp files, one for each feature, and read that file back. Unfortunately the FeatureWriter doesn't allow propogation of feature attributes, but it does propogate _dataset, which does contains the written file path.

I'll see if it fits my need. Thanks for the suggestion.


lifalin2016
Supporter
Forum|alt.badge.img+40
  • Author
  • Supporter
  • March 26, 2020

You can fan out features but adding an attribute name into the path field

 

 

C:\\data\\GMLFiles\\@Value(FileName).gml

I found my answer in a different question about something else :-)

You can use GeometryExtractor to generate the geometry portion of the GML, and the rest of the attributes are trivial. So no need to introduce FME's GML engine in this case.

Thanks for your answer though.