Skip to main content

I am trying to convert a set of GML files (KuntaGML) to Shape but am slowly developing a head ache. The source files are each covering a part of the total area, lets call them blocks. Within these "XML-blocks" are a number of features/tables. I want to convert everything to Shape with one shape file for each feature .

What is causing me problems is passing on the schema for each feature/table to the shape file, they are all different and there is upwards of 90 of them. The dynamic writer will pick the first schema it encounters and then run with that, but I need it to update for the subsequent files being written.

I tried inserting a feature reader to detect the schema, but that was incredibly slow so I gave up. There is no .xsd-file so I can not go that route.

Any ideas on how to solve this?

Hi @aron,

Please try using the Feature Type Fanout, as described in this article: Fanout

If you fan out by the attribute fme_feature_type, the source KuntaGML schema will be used for the Shape output.


Hi @DaveAtSafe,

 

Thanks for the suggestion. Unfortunately when using the fanout i get a folder for each layer, but this folder is empty. What am I doing wrong? finland-gml-2-shape.fmw

I attached my workspace if that helps.

 


Hi @aron,

The separate folders are due to the Dataset Fanout in the workspace. You can disable this, and just use Feature Type Fanout to write to separate Shape files.


Reply