itacart.boundary.cell_shape

itacart.boundary.cell_shape(cell)[source]

Geometric class of a cell.

Drives vertex count in itacart.cells.cell_to_boundary() and area computation in itacart.resolutions.effective_cell_area().

"triangle" is inherited and "trapezoid" is not, and the paper says both in the same breath. The meridian triangle is refined into triangles at every resolution, since the indexing “does not create separate western cells”; the trapezoid rule applies “solely to the cells within this specified condition and not to all subsequent resolutions”, so a child of a clipped cell that falls wholly inside the border is an ordinary parallelogram again.

A triangle that is itself clipped – which happens only in the polar row, where the border comes nearer the meridian than one cell width – reports "trapezoid", because the classification exists to answer whether the nominal area still holds.

Parameters:

cell (str) – Compositional index string.

Return type:

Union[Literal['parallelogram', 'triangle', 'trapezoid'], list[Literal['parallelogram', 'triangle', 'trapezoid']]]

Returns:

One of "parallelogram", "triangle" or "trapezoid" for a single cell, or a positionally aligned list.

Raises:

NonExistentCellError – If any cell of the index names no cell. The predicate is the arbiter and the contract ends there: a spelling it denies is refused rather than answered for the cell it would otherwise fold onto.