Skip to main content
Solved

How to fanout CityGML without subfolders?

  • July 14, 2017
  • 6 replies
  • 39 views

hth
Participant
Forum|alt.badge.img+2

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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

6 replies

stalknecht
Contributor
Forum|alt.badge.img+22
  • 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+22
  • 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+22
  • 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.