Skip to content

Utilities functions in the A5 Geospatial Index DuckDB extension

Function category

Utilities

2 functions

General-purpose helpers — total cell count at a resolution, the 12 base cells covering the globe at resolution 0, and parent/child cell ratios.

a5_get_num_cells

Scalar function Utilities
Signature
a5_get_num_cells(resolution: INTEGER) UBIGINT
Arguments (Positional)
Argument resolution Type INTEGER Mode Positional Description
Description
1 Example 1
SELECT a5_get_num_cells(5);

Output

a5_get_num_cells(5)
15360

a5_get_res0_cells

Scalar function Utilities
Signature
a5_get_res0_cells() UBIGINT[]
Description
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]