s2js
    Preparing search index...

    Class CellIndexRangeIterator

    An iterator that seeks and iterates over a set of non-overlapping leaf cell ranges that cover the entire sphere. The indexed (CellID, label) pairs that intersect the current leaf cell range can be visited using CellIndexContentsIterator (see below).

    Index

    Constructors

    Properties

    pos: number
    rangeNodes: RangeNode[]

    Methods

    • Reports if advancing would leave it positioned on a valid range. If the value would not be valid, the positioning is not changed.

      Parameters

      • n: number

      Returns boolean

    • Reports if no (CellID, label) pairs intersect this range. Also returns true if done() is true.

      Returns boolean

    • Reports the non-inclusive end of the current range of leaf CellIDs. This assumes the iterator is not done.

      Returns bigint

    • Positions the iterator at the previous entry and reports whether it was not already positioned at the beginning.

      Returns boolean

    • Positions the iterator at the first range with startID >= target. Such an entry always exists as long as "target" is a valid leaf cell. Note that it is valid to access startID even when done is true.

      Parameters

      • target: bigint

      Returns void

    • Reports the CellID of the start of the current range of leaf CellIDs. If done is true, this returns the last possible CellID. This property means that most loops do not need to test done explicitly.

      Returns bigint