Skip to content

Add H3 hierarchy functions to Sedona #3020

@mithunramesh19

Description

@mithunramesh19

Motivation

Sedona ships four H3 functions (ST_H3CellIDs, ST_H3CellDistance, ST_H3KRing, ST_H3ToGeom) but none of the H3 hierarchy functions.

Parent/child hiearchy functions and cell compactions are rommon H3 workflows that aren't currently expressible in Sedona SQL. The h3 library Sedona already depends on exposes all of these on the existing H3Utils.h3 instance, so no new dependency is needed.

Related: #2329, #914, #1752.

Proposed functions

Function H3 method Returns
ST_H3ToParent(cell, resolution) cellToParent long
ST_H3ToChildren(cell, resolution) cellToChildren array
ST_H3ToCenterChild(cell, resolution) cellToCenterChild long
ST_H3Compact(cells) compactCells array
ST_H3Uncompact(cells, resolution) uncompactCells array

Rollout

I'd like to land these incrementally, one function per PR, starting with ST_H3ToParent.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions