H3_INVALID_CELL_ID error class

SQLSTATE: 22023

<h3Cell> is not a valid H3 cell ID

Parameters

  • h3Cell: An input value that doesn’t correspond to a valid H3 cell ID.

Explanation

Functions that return this error have either encountered an input value that doesn’t correspond to a valid cell ID or is outside the acceptable range for valid H3 cell IDs. The minimum value of this range is 0x08001fffffffffff and the maximum value is 0x08ff3b6db6db6db6. Values within this range may still correspond to invalid H3 cell IDs.

Mitigation

Check that the offending H3 cell ID is valid. If the ID is invalid, filter it out by using the h3_isvalid SQL function.

Examples

-- Invalid cell ID as input to the h3_resolution function.
> SELECT h3_resolution(0)
  [H3_INVALID_CELL_ID] 0 is not a valid H3 cell ID