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_polygons_to_spatial() ddbh3_lines_to_spatial() ddbh3_polygons_to_h3() ddbh3_lines_to_h3()
Convert polygon or linestring geometries 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_base_cell_number()
Get the base cell number of an H3 cell
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_child_pos_to_cell()
Get an H3 child cell from a parent and child position
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 neighborhood

Work with neighbors of H3 cells

ddbh3_grid_disk() ddbh3_grid_disk_distances() ddbh3_grid_ring()
Get H3 grid neighborhoods (disks, rings, and distances)
ddbh3_grid_distance()
Get the grid distance between two H3 cells
ddbh3_grid_path_cells()
Find a grid path connecting two H3 cells
ddbh3_max_grid_disk_size()
Get the maximum grid disk size for a given distance k

H3 properties

Check properties of H3 cell indexes

H3 vertices

Extract and convert H3 cell vertices to spatial representations