Skip to main content

Hello,

I'm looking for a help with a workspace runner. I will try to explain what I'm trying to achieve.

1. I have a polygon and I want to find out what grid tiles this polygon intersects (step 1)

2. I want to use each tile and intersect it with a polygon dataset, do some transformation in between and write the result as shp or tab file (step 2 main workspace)

I found an example here:

 

http://gis.stackexchange.com/questions/111020/how-to-batch-run-an-fme-workspace-on-a-feature-basis

Basically, I want to take one feature from output of step 1, use the feature as an input for my main workspace (step 2), write the output and move onto another feature.

Is this feasible, possible, doable?

Thanks for any help

There's a slightly old but still relevant article that describes it here: https://knowledge.safe.com/articles/1469/batch-processing-using-the-workspacerunner-1.html


This comes down to "how do you get the grid tile into the second workspace"? I'd be tempted to throw the FeatureWriter in there.

1. Read the polygon and find the grid tiles it intersects.

2. Use the FeatureWriter to write each tile to a temporary dataset.

3. Run a second workspace (WorkspaceRunner) to read that temporary dataset and process the data

You would just need to give each feature a different filename in the FeatureWriter so that you got a separate dataset per feature.

If they are square tiles the other solution would be to get the extents (BoundsExtractor) and pass them into the second workspace as published parameters. But I think the FeatureWriter is more elegant.


Reply