Package com.google.common.geometry
Class S2ShapeIndex.RangeIterator
java.lang.Object
com.google.common.geometry.S2ShapeIndex.RangeIterator
- Enclosing class:
S2ShapeIndex
RangeIterator is a wrapper over CellIterator that is specialized for merging shape indices.
This class is is well-tested by S2Loop.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate S2ShapeIndex.S2ClippedShape
private static final S2CellId
private S2CellId
private S2Iterator
<S2ShapeIndex.Cell> private S2CellId
private S2CellId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncell()
clipped()
Various other convenience methods for the current cell.boolean
boolean
done()
id()
Returns the current S2CellId or cell contents.void
next()
int
numEdges()
rangeMax()
rangeMin()
Returns the min and max leaf cell ids covered by the current cell.private void
refresh()
Updates internal state after the iterator has been repositioned.void
seekBeyond
(S2ShapeIndex.RangeIterator target) Positions the iterator at the first cell that followstarget
, i.e.void
seekTo
(S2ShapeIndex.RangeIterator target) Positions the iterator at the first cell that overlaps or followstarget
, i.e.
-
Field Details
-
END
-
it
-
id
-
rangeMin
-
rangeMax
-
clipped
-
-
Constructor Details
-
RangeIterator
-
-
Method Details
-
id
Returns the current S2CellId or cell contents. -
cell
-
rangeMin
Returns the min and max leaf cell ids covered by the current cell. If done() is true, these methods return a value larger than any valid cell id. -
rangeMax
-
clipped
Various other convenience methods for the current cell. -
numEdges
public int numEdges() -
containsCenter
public boolean containsCenter() -
next
public void next() -
done
public boolean done() -
seekTo
Positions the iterator at the first cell that overlaps or followstarget
, i.e. such that rangeMax() >= target.rangeMin(). -
seekBeyond
Positions the iterator at the first cell that followstarget
, i.e. the first cell such that rangeMin() > target.rangeMax(). -
refresh
private void refresh()Updates internal state after the iterator has been repositioned.
-