Skip to main content
Question

Iterating a workspace over feature types


Forum|alt.badge.img+1
I have recently had occasion to need to iterate my workspaces; that is, to run them multiple times on varying inputs.

 

 

When I need to do this on a group of files, I can pretty easily write a shell script to launch the workspace with a different input and output dataset for each of the input files.

 

 

However, I am now trying to extend this method to iterate over the feature types (in this case, Microstation .dgn levels) within a single file.  I can't seem to figure out a way to implement this, though.

 

 

I need to publish a parameter that controls which level is processed.  However, I can't seem to do that.  I can't create a reader for a single feature type and publish the parameter that picks which one (it is greyed out), and I can't read the whole file and filter it, because I can't seem to link the actual filter variables to a published parameter.

 

 

There is probably a way to do this, probably not even using shell scripts, but I can't figure out what it is.  Any ideas?

4 replies

fmelizard
Contributor
Forum|alt.badge.img+17
  • Contributor
  • March 1, 2013
The feature types to read parameter controls the levels in the case of a dgn file  it is usually  automatically published when inserting a dgn reader.

davideagle
Contributor
Forum|alt.badge.img+19
  • Contributor
  • March 1, 2013
This is it:

 

 

 

 

And if you make your reader 'Dynamic' you won't need to worry when new levels that you didn't previously know about appear in your files.

 


Forum|alt.badge.img+1
  • Author
  • March 1, 2013
OK, this looks good, and I'm much closer (thank you) ... but, I'm still stuck.

 

 

When I add the .dgn writer, I can either add the feature types individually, or merge them.  If I merge them, it looks like this won't work, because the writer treats them all as one feature type (albiet with different igds_level values).  If I don't merge them, then I can't generalize the transformer, because it will only create feature type readers for those features that are in this particular .dgn.  I am trying to get it to dynamically run on those feature types (levels) that are within whatever .dgn I give it, with me only having to edit the loop in my shell script.

sigtill
Contributor
Forum|alt.badge.img+24
  • Contributor
  • March 4, 2013
Hi Azeisinger!

 

 

You can try to use a FeatureReader in combination with an AttributeCreator. The AttributeCreator will take as input a text-field as a Published Parameter where you specify which Levels to load (for instance: "1201:1203" (remember, they have to be separated by a ":".

 

 


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