Skip to content

Cell Properties functions in the A5 Geospatial Index DuckDB extension

Function category

Cell Properties

5 functions

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_edge_length_avg

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

Output

a5_cell_edge_length_avg(10)
4675.881472821423

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.91841441068891, 37.07072636323092), (-123.07208493364055, 36.93440251226853), (-122.23003392974135, 36.79239099498031), (-121.39776711864215, 36.97396218211518), (-120.5617228138475, 37.150588175283566), (-120.90288444799262, 37.727609112987), (-121.24914021841249, 38.30267874469804), (-122.1294038096313, 38.231723424706054), (-123.00840835218185, 38.15508109275352), (-123.46729324681684, 37.61361779528323), (-123.91841441068891, 37.07072636323092)]

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

a5_is_valid_cell

Scalar function Cell Properties
Signature
a5_is_valid_cell(cell: UBIGINT) → BOOLEAN
Arguments (Positional)
Argument cell Type UBIGINT Mode Positional Description
Description
1 Example 1
SELECT a5_is_valid_cell(a5_lonlat_to_cell(-122.4, 37.8, 5));

Output

a5_is_valid_cell(a5_lonlat_to_cell(-122.4, 37.8, 5))
true