Adding a group to the model allows you to organize tools within the model into logical units, facilitating group management. The GPA modeling interface provides two modes: regular group and conditional group.
1. Regular Group: When there are many tools in a model, adding a regular group helps quickly clarify the business logic. Collapsing a group can streamline model visualization, enhancing its readability.
2. Conditional Group: When different conditional filtering branches in a model need to converge into the same subsequent processing workflow, adding a conditional group enables workflow reuse, achieving the goal of simplifying the model.
- You can select multiple tools on the canvas and then create a conditional group via the GPA tab -> Group -> Conditional Group button.
- Within a conditional group, you can add multiple conditional branches, each with a different filter set. When multiple branches are satisfied simultaneously, the model will, by default, execute the first satisfied branch in top-to-bottom canvas order.
Feature Description
1. Create Group: Hold down the left mouse button to select multiple tools on the canvas, then choose to create a regular group or a conditional group from the context menu.
2. Cancel Group: Select an existing group and choose 'Cancel Group' from the context menu.
3. Collapse Group: Click the collapse button in the upper-right corner of a group to collapse it, thereby streamlining the model's display.
4. Rename Group: Select 'Rename' from the group's context menu and enter a suitable name to make the group's purpose more intuitive.
Use Case One: Add a Regular Group to Simplify Model Display
Take the terrain suitability analysis model as an example. This model analyzes regional land development suitability by considering factors such as elevation, slope, and aspect influencing land use patterns. When sharing the model, to help others understand it quickly, we add groups to it. As shown in the figure below, first select tools like "Slope Analysis," "Slope Aspect Analysis," and "Maximum and Minimum Value Judgment," then choose to add a regular group. Next, considering the functional logic within the group, rename the group to "Terrain Factor Calculation." Finally, we collapse the added group to obtain a simplified view of the model.

The terrain suitability analysis model after collapsing the group is as follows:

Use Case Two: Add a Conditional Group, Used in Combination with Conditional Filtering
Taking the model for creating an image collection using a manifest file as an example, since it's uncertain whether the data source storing the image collection exists, we can add a condition to filter: determine if the specified data source exists, then open it directly; if it doesn't exist, create a data source. However, the outputs from both "Open Datasource" and "Create a Datasource" cannot connect to the data source parameter of "Create Mosaic Dataset" simultaneously. In this case, creating a conditional group enables workflow reuse, avoiding duplicate construction of subsequent processing steps.
As shown in the figure below, first, we select "Create Datasource for Image Collection" and "Open Datasource for Image Collection," then choose to add a conditional group. Next, connect the input node of the group frame to the input of "Create Datasource for Image Collection," and connect the output of "Create Datasource for Image Collection" to the output node of the group frame. Similarly, complete the connections for "Open Datasource for Image Collection." Additionally, set filters on the respective input connecting lines to "Datasource does not exist" and "Datasource exists." Finally, connect the "Image Collection Datasource Connection Information" to the input node of the group frame and connect the output node of the group frame to the data source parameter of "Create Mosaic Dataset." During execution, the corresponding branch within the conditional group will be selected based on the filter conditions.

Use Case Three: Add a Conditional Group, Used in Combination with Iterative Loops
In early warning and forecasting of geological disasters such as floods and landslides, it is often necessary to read and visualize multi-temporal and multi-site precipitation observation data. Taking the import of precipitation data from meteorological stations across provinces in a country as an example, the preprocessed precipitation data is saved in txt and csv formats. We need to batch import the precipitation data and perform Kriging interpolation. Here, a conditional group is used to import precipitation data in txt and csv formats separately. Combined with an iterative loop, this enables batch data reading, followed by unified analysis and processing.
As shown in the figure below, use [Iterate File] to batch import precipitation data. Then, select the [Import CSV] and [Import TXT] tools and add a conditional group. After completing the connections, set filters on the input connecting lines of [Import CSV] and [Import TXT]. Select the condition type as "String Match" and fill in the matching expressions as *.csv and *.txt respectively to import precipitation data in different formats. After importing, the data defaults to a planar coordinate system. Use [Reset the Coordinate System] to set the coordinate system to WGS84. Then add a numeric field and update the precipitation values to the new field. Finally, perform Kriging interpolation on the precipitation data to obtain a national rainfall distribution map across provinces.
