Solved

Generate GML for a single feature ?

  • 25 March 2020
  • 3 replies
  • 0 views

Userlevel 1
Badge +22

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.

icon

Best answer by virtualcitymatt 25 March 2020, 15:01

View original

3 replies

Userlevel 4
Badge +26

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

 

 

C:\\data\\GMLFiles\\@Value(FileName).gml
Userlevel 1
Badge +22

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.

Userlevel 1
Badge +22

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