Skip to content

Geometry Integration functions in the A5 Geospatial Index DuckDB extension

Function category

Geometry Integration

3 functions

a5_cell_to_geometry

Scalar function Geometry Integration
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument cell Type UBIGINT Mode Positional Description
Description
1 Example 1
SELECT a5_cell_to_geometry(a5_lonlat_to_cell(-122.4, 37.8, 5));

Output

a5_cell_to_geometry(a5_lonlat_to_cell(-122.4, 37.8, 5))
POLYGON ((-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_cell_to_point

Scalar function Geometry Integration
Signature
a5_cell_to_point(cell: UBIGINT) GEOMETRY
Arguments (Positional)
Argument cell Type UBIGINT Mode Positional Description
Description
1 Example 1
SELECT a5_cell_to_point(a5_lonlat_to_cell(-122.4, 37.8, 5));

Output

a5_cell_to_point(a5_lonlat_to_cell(-122.4, 37.8, 5))
POINT (-122.1945267557461 37.499947342760166)

a5_geometry_to_cells

Scalar function Geometry Integration
Signature
2 overloaded forms · click to inspect
Arguments (Positional)
Argument geom Type GEOMETRY Mode Positional Description
Argument resolution Type INTEGER Mode Positional Description
Description
1 Example 1
SELECT a5_geometry_to_cells('MULTIPOINT((0 0), (10 10))'::GEOMETRY, 8);

Output

a5_geometry_to_cells(CAST('MULTIPOINT((0 0), (10 10))' AS "GEOMETRY"), 8)
[5694194798391459840, 6240643281303109632]