Skip to main content
edited title
Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

How to get a Getting writer in FME to output as the appointed filetype while using a FilenamePartExtractor?

Source Link
B.Quaink
  • 465
  • 3
  • 18

How to get a writer in FME to output as the appointed filetype while using a FilenamePartExtractor?

My goal is to merge all shapefiles in the same folder and outputting them as a gml with name of the folder.

So it looks like this:

  • Main Dir
    • Set1
      • roads.shp
      • buildings.shp
    • Set 2
      • roads.shp
      • ...

I managed to merge the files together on this way:

Using the Shapefile Reader and setting the input to a folder with subdirectories. Then, using the FilenamePartExtractor transformer I extract the name of the folder (set1/set2/..).

Then I write to GML with the name of the folder and fanning out the GML with this name as input. The output is a file without extension, but with the correct name.

Changing the filetype to .gml confirms they have merged succesfully. But why is it not automatically writing as .gml in FME?

nb. it does output a correct .xsd file.

My navigator in FME: FME Navigator settings and parameters

And the output in my \Testdat_GML_Output\ folder: Output folder