Skip to contents

Setup and Connection

Manage connections with H3 extension

ddbh3_create_conn()
Create a DuckDB connection with spatial and h3 extensions
ddbh3_default_conn()
Get or create default DuckDB connection

H3 representations

Converts from/to different H3 representations

ddbh3_h3_to_lon() ddbh3_h3_to_lat() ddbh3_h3_to_spatial() ddbh3_strings_to_bigint() ddbh3_bigint_to_strings() ddbh3_h3_to_points()
Convert H3 string or UBIGINT indexes to other representations
ddbh3_lonlat_to_spatial() ddbh3_lonlat_to_h3()
Convert longitude and latitude to H3 cell representations
ddbh3_points_to_spatial() ddbh3_points_to_h3()
Convert spatial points to H3 cell representations

H3 hierarchy

Work with H3 resolutions and hierarchy levels

ddbh3_get_resolution()
Get the resolution of H3 cell indexes
ddbh3_get_child_pos()
Get the position of an H3 cell within its parent
ddbh3_get_parent() ddbh3_get_children() ddbh3_get_n_children() ddbh3_get_center_child()
Get parent and children H3 cells
ddbh3_get_icosahedron_faces()
Get the icosahedron faces of H3 cell indexes

H3 properties

Check properties of H3 cell indexes

H3 vertices

Extract and convert H3 cell vertices to spatial representations