Skip to main content

Hi. I have a lot of features in my workspace and want to group them based on the region, they are falling in, and then run the workspace for each region separately. How can I set up the workspace to do that automatically ??

Many Thanks

Option 1

Have a pre-processing workspace that reads your input data and writes it back out split by region.

Then you can run the actual workspace in batch mode, or have primary/helper workspaces with the workspaceRunner.

 

Option 2

Do you actually need to run the workspaces separately, or can you use a group-by throughout the processing, either at the transformers, or by wrapping them in a custom transformer.

 

Option 3

(for rectangular regions)

Expose the search envelope parameters on your reader.

Have a parameter for region name/id, and make sure the output path or filename includes it (or some other method of ensuring each succesive region doesn't overwrite the previous data)

Have a primary workspace that reads the regions data and extracts the bounds as attributes. Feed them into a workspaceRunner setting the parameters from the attributes.

 

Option 4

Primary workspace reads the region data and extracts the geometry as an attribute and passes it as a parameter in the workspaceRunner.

Helper workspace, Creator -> geometryReplacer (from parameter_->FeatureReader with with Spatial Filer OGC-Intersects.

 


Reply