Returns the approximate area of this cell. This method is accurate to within 3% percent for all cell sizes and accurate to within 0.1% for cells at level 5 or higher (i.e. squares 350km to a side or smaller on the Earth's surface). It is moderately cheap to compute.
Returns the average area of cells at the level of this cell. This is accurate to within a factor of 1.7.
Returns the bounding cap of this cell.
Computes a covering of the Cell.
Returns the four direct children of this cell in traversal order and returns true. If this is a leaf cell, or the children could not be created, false is returned. The C++ method is called Subdivide.
Reports whether this cell contains the given point. Note that unlike Loop/Polygon, a Cell is considered to be a closed set. This means that a point on a Cell's edge or vertex belongs to the Cell and the relevant adjacent Cells too.
If you want every point to be contained by exactly one Cell, you will need to convert the Cell to a Loop.
Returns the minimum distance from this cell to the given cell. It returns zero if one cell contains the other.
Returns the area of this cell as accurately as possible.
Reports whether the intersection of this cell and the other cell is not nil.
Returns whether this Cell is a leaf or not.
Returns the latitude of the cell vertex in radians given by (i,j), where i and j indicate the Hi (1) or Lo (0) corner.
Returns the longitude of the cell vertex in radians given by (i,j), where i and j indicate the Hi (1) or Lo (0) corner.
Returns the maximum distance from the cell (including its interior) to the given target cell.
Returns the edge length of this cell in (i,j)-space.
Returns the edge length of this cell in (s,t)-space.
Static
edgeReports the distance from a Point P to a given Cell edge. The point P is given by its dot product, and the uv edge by its normal in the given coordinate value.
Static
oppositeReturns the face opposite the given face.
Cell is an S2 region object that represents a cell. Unlike CellIDs, it supports efficient containment and intersection tests. However, it is also a more expensive representation.