Solved

How to fanout CityGML without subfolders?


Badge +1

Hello,

I would like to fanout CityGML-files depending on an attribute. As far as I know, I can use the dataset fanout. On CityGML-data it creates a subfolder and a CityGML-file in it, which have both the same name. The featuretype-fanout won't work (I guess), because I have to define roofsurfaces, wallsurfaces etc. there.

So is there a way to fanout CityGML without subfolders having all files in one outputfolder at the end?

icon

Best answer by stalknecht 18 July 2017, 07:48

View original

6 replies

Userlevel 1
Badge +17
Can you provide a CityGML for us to test?

 

 

Badge +1

citygml-testfiles.zip

Here are two citygml-files. Try to export them with fanout-option so you can get the same fme_basenames without any subdirectorys. The writer should look like this (perhaps without Address):

Userlevel 1
Badge +17

 

Must it only work in workbench or has the workspace to be served by fme server?

 

Badge +1

 

It should work in workbench, but without any batch-scripts. I know, I can do it with .bat-files, reading one file after the other, starting the FME several times.

 

But in my case, I am creating the citygml-files within FME and want to use the fanout afterwards. So I don't use a reader to get them into FME, like the examples I posted earlier.

 

Userlevel 1
Badge +17

You can use a featurewriter and a systemcaller to do the trick:

The systemcaller will use a ROBOCOPY command.

gml2citygml.fmw

You can also solve this by:

  • Instead of using cmd files you can use a workspacerunner.
  • Use a python shutdownscript.

let me know what you prefer.

Badge +1

Thank you very much for the help!

The featurewriter and systemcaller with robocopy worked for me. I had to adjust a few things, so the featurewriter has seperate featuretypes like citymodel, building, wallsurface etc. and I am able to choose the save-drawner with a public Parameter on start. So everything is fine now.

Reply