Method GetCells
GetCells(IShape, Int32, Boolean, Boolean)
Gets the intersecting cells for the specified shape, without exceeding detail level.
Declaration
public virtual IList<Cell> GetCells(IShape shape, int detailLevel, bool inclParents, bool simplify)
Parameters
Type | Name | Description |
---|---|---|
IShape | shape | the shape; non-null |
System.Int32 | detailLevel | the maximum detail level to get cells for |
System.Boolean | inclParents | if true then all parent cells of leaves are returned too. The top world cell is never returned. |
System.Boolean | simplify | for non-point shapes, this will simply/aggregate sets of complete leaves in a cell to its parent, resulting in ~20-25% fewer cells. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<Cell> | a set of cells (no dups), sorted, immutable, non-null |
Remarks
Gets the intersecting cells for the specified shape, without exceeding detail level. If a cell is within the query shape then it's marked as a leaf and none of its children are added.
This implementation checks if shape is a IPoint and if so returns GetCells(IPoint, Int32, Boolean).
GetCells(IPoint, Int32, Boolean)
A Point-optimized implementation of GetCells(IShape, Int32, Boolean, Boolean). That method in facts calls this for points.
This implementation depends on GetCell(String) being fast, as its called repeatedly when incPlarents is true.
Declaration
public virtual IList<Cell> GetCells(IPoint p, int detailLevel, bool inclParents)
Parameters
Type | Name | Description |
---|---|---|
IPoint | p | |
System.Int32 | detailLevel | |
System.Boolean | inclParents |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<Cell> |