Positions the iterator at the first index cell (if any).
Returns a reference to the contents of the current index cell.
Returns the center point of the cell.
Returns an exact copy of this iterator.
Makes a copy of the given source iterator. REQUIRES: "other" has the same concrete type as "this".
Returns true if the iterator is positioned past the last index cell.
Positions the iterator past the last index cell.
This method is called to decode the contents of the current cell, if set_state() was previously called with a nullptr "cell" argument. This allows decoding on demand for subtypes that keep the cell contents in an encoded state. It does not need to be implemented at all if set_state() is always called with (cell != nullptr).
Positions the iterator at the cell containing "target". If no such cell exists, returns false and leaves the iterator positioned arbitrarily. The returned index cell is guaranteed to contain all edges that might intersect the line segment between "target" and the cell center.
Let T be the target S2CellId. If T is contained by some index cell I (including equality), this method positions the iterator at I and returns INDEXED. Otherwise if T contains one or more (smaller) index cells, it positions the iterator at the first such cell I and returns SUBDIVIDED. Otherwise it returns DISJOINT and leaves the iterator positioned arbitrarily.
Positions the iterator at the next index cell.
If the iterator is already positioned at the beginning, returns false. Otherwise positions the iterator at the previous entry and returns true.
Returns the current contents of the "cell_" field, which may be null if the cell contents have not been decoded yet.
Positions the iterator at the first cell with id() >= target, or at the end of the index if no such cell exists.
Sets the iterator state so that done() is true.
Sets the iterator state. "cell" typically points to the cell contents, but may also be given as "nullptr" in order to implement decoding on demand. In that situation, the first that the client attempts to access the cell contents, the GetCell() method is called and "cell_" is updated in a thread-safe way.
Returns the S2CellId of the current index cell. If done() is true, returns a value larger than any valid S2CellId (S2CellId::Sentinel()).
The default implementation of Locate(S2Point). It is instantiated by each subtype in order to (1) minimize the number of virtual method calls (since subtypes are typically "final") and (2) ensure that the correct versions of non-virtual methods such as cell() are called.
Each subtype of S2ShapeIndex should define an Iterator type derived from the following base class.