Cell Indexing‎ > ‎

Iterators


Basic Iterators

The DGGS SDK provides basic operations to traverse cell locations:
  1. Move - Given a cell index, return the next cell in a given direction where the definition of direction is based on the tile structure and indexing;
  2. Neighbors - Given a cell index, return all neighbor cells (touch);
  3. Parent & Children - Given a cell index, return set of all child cells at the next refinement and its single parent cell;  
  4. Natural Tile: Given a cell index and a depth, return set of all child cells and refinements to the given depth;
  5. Cover - Given a cell index and a depth, return all the congruent cells at the given depth.

Selection Iterators

Basic iterators can be used to build selection iterators that  run over cell collections independent of indexing:
  1. Feature Geometry - Given a feature geometry and a cell resolution, return all cells that intersect the geometry at the given resolution;
  2. Condition - Given a cell resolution and a condition, return all cells that contain data values that meet the given condition;
  3. Conditional Flood Fill - Given a cell index and a condition, return all touching cells of the same resolution that contain data values that meet the given condition;
  4. Shortest Path - Given 2 cell indices and cost function, return the set of cells of the same resolution that represent the shortest path.

Comments