The Lists transforms are a category that create or query lists.

Lists are ordered data structures that contain multiple items.

You can perform a variety of functions on lists. Using our favorite animal example, we can do things like:

  1. Count how many animals are in the list
  2. Find out if the list contains “Hippo”
  3. Find the location of “Giraffe”
  4. Grab Rhino from the list
  5. Add more animals to the list
  6. Add more information to everything in the list (imagine we want to also store the color of the animal)

And much more!

Working with Lists

Lists, by virtue of being a data structure containing multiple items, are more efficient for computation than processing lots of unique individual items. However, working with lists does require some additional logic in the set up of our Flows to process.

Identify a list

Simply, you can tell if a data structure is a list if it contains multiple items. You might ask, how can I tell if a structure contains multiple items?

The easiest way to know is if what you would expect to see resulting on the map is more than one basic geometry. For instance:

This is not a list.

It is a single rectangle.

Any processing is done to just the single element

image.png

This is a list.

This is the same rectangle with the subdivide lots transform applied, which divides the original geometry into multiple sub-geometries.

image.png

How to know if a node expects or creates a list?

You will see the [ ] brackets next to the connector on the node if it works with lists.

A node with list input

A node with list input

A node with list outputs

A node with list outputs

A node with list inputs and outputs

A node with list inputs and outputs

Create a list

Use the encapsulate in list node to create a list. Many nodes will also result in lists based on the function they perform, such as repeat or any of the dendrogram nodes.

<aside> 💡

To create a list without a mediating node, hold “shift” to connect multiple outputs into the same input

</aside>

Untitled