Skip to main content
Solved

Generate GML for a single feature ?


lifalin2016
Contributor
Forum|alt.badge.img+29

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
View original
Did this help you find an answer to your question?

3 replies

virtualcitymatt
Celebrity
Forum|alt.badge.img+35

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

 

 

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

lifalin2016
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • March 26, 2020
virtualcitymatt wrote:

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
Contributor
Forum|alt.badge.img+29
  • Author
  • Contributor
  • March 26, 2020
virtualcitymatt wrote:

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.


Reply


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