Skip to main content
Solved

How to fanout CityGML without subfolders?


hth
Participant
Forum|alt.badge.img+2
  • Participant

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?

Best answer by stalknecht

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.

View original
Did this help you find an answer to your question?

6 replies

stalknecht
Contributor
Forum|alt.badge.img+21
  • Contributor
  • July 14, 2017
Can you provide a CityGML for us to test?

 

 


hth
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • July 17, 2017

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):


stalknecht
Contributor
Forum|alt.badge.img+21
  • Contributor
  • July 17, 2017

 

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

 


hth
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • July 18, 2017

 

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.

 


stalknecht
Contributor
Forum|alt.badge.img+21
  • Contributor
  • Best Answer
  • July 18, 2017

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.


hth
Participant
Forum|alt.badge.img+2
  • Author
  • Participant
  • July 18, 2017

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.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings