>  Docs Center  >  Using ENVI  >  Collect Items Using Aggregator Nodes


Collect Items Using Aggregator Nodes

Collect Items Using Aggregator Nodes

Use an Aggregator node to:

  • Collect multiple items into an array, which is then passed to a subsequent operation.
  • Close a loop defined by an Iterator node.

The examples below demonstrate both concepts. Aggregator nodes are often used in conjunction with Iterator nodes.

If a task node requires an array of input rasters (for example, Build Time Series), an Aggregator node may be needed before the task node in order to assemble all of the input rasters into an array.

You can connect as many inputs to an Aggregator node as you want, provided they are all the same type of data (such as raster or vector). An exception is when an Aggregator node closes a loop, in which case it cannot accept any other inputs. You can link multiple Aggregator nodes that close loops to combine all of their outputs.


Collect Spectrum Names from a Spectral Library

Many spectral analysis tools (for example, Linear Spectral Unmixing) require the names of spectra from a spectral library. This example extracts five known spectrum names from a spectral library of minerals that is installed with ENVI. You would have to know the names of the spectra you were interested in, then copy and paste them into an Array of Values node. The partial model shown here adds all five spectra to a Get Spectrum from Library task node.

An Aggregator node collects the spectra and passes them to a spectral analysis tool. The Aggregator node also closes the loop defined by the Iterator node.

Hillshade Images Created from Different Azimuth Values

This example shows how to create multiple shaded relief (hillshade) images, each using a different solar azimuth value in increments of 45°. An Array of Values node records the different azimuth values. The Topographic Modeling task node runs multiple times, each using a different azimuth value. An Aggregator node collects the resulting shaded relief images, and a Build Band Stack task node creates one image where each band is a different shaded relief image.

Temporal Classification

Instead of classifying a single image based on spectral signatures, this example calculates a Normalized Difference Vegetation Index for multiple images, assembles the results into a multi-band image, and creates a classification image of the NDVI results over time.

Combining Aggregator Nodes

A model can contain multiple Aggregator nodes, some of which close Iterator loops and others that collect the results of parallel processing to pass to subsequent operations. The following example contains two parallel Filter Iterator operations, one that checks if input rasters contain a standard projection and another that checks if they contain an RPC spatial reference. The rasters with an RPC spatial reference are passed to an RPC Orthorectification task before being passed to the Aggregator node. The results from both iterations are collected with a final Aggregator node and subsequently passed to the Build Mosaic Raster task.

Extract Option (Advanced)

Aggregator nodes have an option to separate lists or arrays into individual elements, if your model requires it. Click the button to display the Aggregator dialog. If the Extract option is set to Yes (the default option), any array added to the Aggregator node will be disassembled, and each of its elements will be added as a separate item.

For example, suppose that the following arrays have been added to an Aggregator node:


By setting the Extract option to Yes, the output will be disassembled as follows:


See Also

Batch-Process Data Using Iterator Nodes, Apply Conditional Statements Using Filter Iterator Nodes, Extract Elements From Arrays, Specify Input Datasets and Task Parameters, Specify Model Output

© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us