Skip to content

Cell Properties functions in the A5 Geospatial Index DuckDB extension

Function category

Cell Properties

3 functions

Inspect a specific cell — its area in square meters, its resolution level, and the polygon vertices that form its boundary. Useful for filtering, validation, and rendering cells on a map.

a5_cell_area

Scalar function Cell Properties
Signature
a5_cell_area(resolution: INTEGER) DOUBLE
Arguments (Positional)
Argument resolution Type INTEGER Mode Positional Description
Description
1 Example 1
SELECT a5_cell_area(10);

Output

a5_cell_area(10)
32429099.068923894

a5_cell_to_boundary

Scalar function Cell Properties
Signature
3 overloaded forms · click to inspect
Arguments (Positional)
Argument cell Type UBIGINT Mode Positional Description
Description
1 Example 1
SELECT a5_cell_to_boundary(a5_lonlat_to_cell(-122.4, 37.8, 5));

Output

a5_cell_to_boundary(a5_lonlat_to_cell(-122.4, 37.8, 5))
[(-123.91841441068892, 37.07072636323091), (-123.07208493364051, 36.93440251226853), (-122.23003392974138, 36.7923909949803), (-121.39776711864215, 36.97396218211518), (-120.56172281384751, 37.15058817528356), (-120.90288444799263, 37.72760911298699), (-121.2491402184125, 38.30267874469805), (-122.1294038096313, 38.23172342470604), (-123.00840835218182, 38.15508109275353), (-123.46729324681684, 37.61361779528323), (-123.91841441068892, 37.07072636323091)]

a5_get_resolution

Scalar function Cell Properties
Signature
a5_get_resolution(cell: UBIGINT) INTEGER
Arguments (Positional)
Argument cell Type UBIGINT Mode Positional Description
Description
1 Example 1
SELECT a5_get_resolution(a5_lonlat_to_cell(-122.4, 37.8, 10));

Output

a5_get_resolution(a5_lonlat_to_cell(-122.4, 37.8, 10))
10