Categories:

Geospatial functions

H3_IS_PENTAGON¶

Returns TRUE if the boundary of an H3 cell represents a pentagon.

Syntax¶

H3_IS_PENTAGON( <cell_id> )
Copy

Arguments¶

cell_id

An INTEGER value that represents the H3 cell ID (index), or a VARCHAR value that represents the cell ID in hexadecimal format.

Returns¶

Returns a BOOLEAN or NULL.

  • The value is TRUE if the input represents a pentagon. Otherwise, returns FALSE.

  • If the input is NULL, returns NULL without reporting an error.

Examples¶

The following example specifies an integer that does not represent a pentagon.

SELECT H3_IS_PENTAGON(613036919424548863);
Copy
+------------------------------------+
| H3_IS_PENTAGON(613036919424548863) |
|------------------------------------|
| False                              |
+------------------------------------+

The following example specifies a hexadecimal string that represents a pentagon.

SELECT H3_IS_PENTAGON('804dfffffffffff');
Copy
+-----------------------------------+
| H3_IS_PENTAGON('804DFFFFFFFFFFF') |
|-----------------------------------|
| True                              |
+-----------------------------------+