Skip to main content

I've looked at a couple of similarly named questions and they're not quite what I'm after.

I have a work space with many Mapinfo Tables being written to many GML feature types into a single output GML file. 

I'm getting varying orders of output. For example I have a GML Feature called "Header". I'd like that written first. Is there a way to prioritise the execution?

In addition I have two GML Features that use the same MI table as a source. Oddly or perhaps obviously, the output order is "woven" together.

eg

GML Feature 1
GML Feature 1
GML Feature 1
GML Feature 2
GML Feature 1
GML Feature 1
GML Feature 2
GML Feature 1
GML Feature 2

While I know write order is inconsequential in XML\GML there is a process where somebody eyeballs the Header in a text editor to make sure the content is correct. Looking for the header buried in the files just adds time.

Any advice appreciated.

Hi @andyew, if you are using one or more blocking transformer (sometimes called group-based transformer) in the workflow, the order of features written may be different from the order of features read.

To control the order, a possible way is, add an attribute storing a number that represents your desired order to every feature, and sort the features with the Sorter by the number before writing. For example, give 0 to the "Header" feature; give 1 or greater to other features with the Counter. You can then sort them to guarantee that the "Header" will always be written at first.


Reply