itacart.intervals.intervals_to_cells

itacart.intervals.intervals_to_cells(intervals)[source]

The index of the region an interval list covers.

Return type:

str

Returns:

The compositional index itacart.compact_cells() writes for the region, so its TreeBlob is the region’s TreeBlob.

Raises:
  • InvalidIndexError – If the list is empty, or is not a list of ranges of one resolution.

  • NonExistentCellError – If a range covers an address that names no cell: the western zero column, a column past the border, the prefix column 2004, or the codes the polar row collapses away.

Parameters:

intervals (Iterable[Sequence[int]])

Example

>>> intervals_to_cells(cells_to_intervals("NE(0625/0451(1,2,3,4))"))
'NE(0625/0451)'
Parameters:

intervals (Iterable[Sequence[int]])

Return type:

str