Utilities functions in the A5 Geospatial Index DuckDB extension
Function category
Utilities
2 functionsGeneral-purpose helpers — total cell count at a resolution, the 12 base cells covering the globe at resolution 0, and parent/child cell ratios.
Signature
a5_get_num_cells(resolution: INTEGER) → UBIGINT
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
resolution
|
Type
INTEGER
|
Mode Positional | Description |
Description
Returns the total number of A5 cells at the specified resolution level (0-30)
1
Example 1
SELECT a5_get_num_cells(5);
Output
| a5_get_num_cells(5) |
|---|
| 15360 |
Related functions
- a5_cell_area() — Returns the area in square meters of an A5 cell at the specified resolution level
- a5_get_num_children() — Returns the number of child cells at child_resolution that fit within a cell at parent_resolution
- a5_get_res0_cells() — Returns all 12 resolution 0 (root) A5 cells covering the entire globe
Signature
a5_get_res0_cells() → UBIGINT[]
Description
Returns all 12 resolution 0 (root) A5 cells covering the entire globe
1
Example 1
SELECT a5_get_res0_cells();
Output
| a5_get_res0_cells() |
|---|
| [144115188075855872, 432345564227567616, 720575940379279360, 1008806316530991104, 1297036692682702848, 1585267068834414592, 1873497444986126336, 2161727821137838080, 2449958197289549824, 2738188573441261568, 3026418949592973312, 3314649325744685056] |