Cell Properties functions in the A5 Geospatial Index DuckDB extension
Function category
Cell Properties
3 functionsInspect 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.
Signature
a5_cell_area(resolution: INTEGER) → DOUBLE
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
resolution
|
Type
INTEGER
|
Mode Positional | Description |
Description
Returns the area in square meters of an A5 cell at the specified resolution level
1
Example 1
SELECT a5_cell_area(10);
Output
| a5_cell_area(10) |
|---|
| 32429099.068923894 |
Signature
3 overloaded forms · click to inspectArguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
cell
|
Type
UBIGINT
|
Mode Positional | Description |
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
cell
|
Type
UBIGINT
|
Mode Positional | Description |
Argument
closed_ring
|
Type
BOOLEAN
|
Mode Positional | Description |
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
cell
|
Type
UBIGINT
|
Mode Positional | Description |
Argument
closed_ring
|
Type
BOOLEAN
|
Mode Positional | Description |
Argument
segments
|
Type
INTEGER
|
Mode Positional | Description |
Description
Returns the boundary vertices of an A5 cell as a closed ring of [lon, lat] points
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)] |
Signature
a5_get_resolution(cell: UBIGINT) → INTEGER
Arguments (Positional)
| Argument | Type | Mode | Description |
|---|---|---|---|
Argument
cell
|
Type
UBIGINT
|
Mode Positional | Description |
Description
Returns the resolution level (0-30) of an A5 cell
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 |