Skip to main content

Hello guys,

i have a feature class with the county of new york, some one say to me that if want to iterate through the county i need to :

"Create a published parameter for the county (name or id) to limit the workspace to one county.

Create a second workspace with a reader for the counties."

I dont really know how to create a published parameter on a attribute value like the name of my county feature class. who could help me ?

Hi @pascalfilippi​ ,

 

I agree with the advice you were given. I think the simplest way to handle this would be to call the second workspace using a WorkspaceRunner that has a published parameter to pass the value of the current county into the workspace.

 

You can create the published parameter in most transformers or by right clicking on the User Parameters in the Navigator window.

CreateParamYou'll create the published parameter(s) in the child workspace. Then depending on the format you are working with, you can either use a Tester to filter for the county you want to pass through the workspace or using a WHERE Clause in the reader feature type (published parameters can be used there too!).

 

Then in the parent workspace, add the WorkspaceRunner and point it to the child workspace you just built.WorkspaceRunner

You'll see the same parameters that you just created and those can be set using attribute values.

ParameterValues

Since the WorkspaceRunner will run the workspace for each feature that is sent to it, this will allow you to iterate through your counties one by one. I've attached a simple example of how to iterate through neighborhoods dataset (replace with random points in the child workspace to represent population).

 

Worth mentioning you can learn more about batch processing and published parameters in the Advanced Training.


Reply