Cell Iterators

Cells are the atoms of the DGGS and, therefore, treated as a special object in the DGGS Language.  A cell can be defined using a combination of a DGGS Structure and its unique DGGS Index:
This example shows that:
  1. Cell is identified by it's indexing.
  2. When using the same DGGS.Structure, it is possible to convert between different indices.
  3. Cell index can be converted losslessly from, and into, LatLonRadius.


Iterators are efficient functions to traverse cells. Iterators provide the following benefits:
  1. As the DGGS structure are semi-regular, the iterators provide explicit and optimized traversing over the data structure horizontally (nearest neighbor cells) and vertically (parent/child cells).
  2. There are benefits of using one indexing method or another.  Some iterators are more efficient using one particular index.  The DGGS Language provides the developer with a choice of optimized methods to iterate over cells.
  3. High order operations can use Iterators without knowledge of the underlying Tile Structure or Indexing.  This allows processes and algorithms to be developed that will work over any DGGS.
List of basic iterators:
  1. Move - Given a cell, find the neighbor cell of a given a direction. The definition of direction is based on the DGGS Tile Structure and Indexing. Each indexing should provide a list of valid directions.
  2. Neighbors - Given a cell, iterate over all cells that are neighbors of that given cell at the same resolution. Triangle & rectilinear DGGS results include a distinction between edge and vertex neighbors.
  3. Parent & Children - Given a cell, find all children (of a single parent) to a given resolution. This iterator allows - breadth first and depth first -  traversal down all cells in a region bound by a parent cells.
  4. Intersects & Cover - Given a cell, the ability to traverse over all cells down to a given resolution that cover that cell.  Parent & Child is the same as Cover for congruent Tiling Structures.

An example of how to use DGGS.Iterator to navigate:


These operations allow iteration over collections of cells.

Cells acts as a c++ 11 container, and therefor a simple efficient code to iterate over a collection of cells. 


Cells can be stored as a set of cells or compressed within tiling using compression methods that leverage the indexing used.
Refer to Selectors for more advance ways to functionally represent, modify and manipulate set of Cells.
Advanced operations can be achieved with the section of a given set of cells and the application of Aggregators on values associated with those cells.