minca
ApiSchemasFunctions

Function: cellsAround()

function cellsAround(
   lat, 
   lon, 
   radiusKm
): 
  | {
  cells: string[];
  precision: number;
}
  | null;

Defined in: packages/core/src/schemas/geo.ts:134

The cells that hold everything within radiusKm of a point: the finest of CELL_PRECISIONS whose cells are at least that wide and tall there, and the eight around the point's own. Something inside the circle is in one of them; not everything in them is inside the circle, so check the distance too. Null when even the coarsest cells are too small (a radius over about 150 km, or near a pole): then there is no shortcut, and every place is a candidate.

Parameters

ParameterType
latnumber
lonnumber
radiusKmnumber

Returns

| { cells: string[]; precision: number; } | null

On this page