Categories:

Geospatial functions

H3_IS_PENTAGON

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

语法

H3_IS_PENTAGON( <cell_id> )

实参

cell_id

An INTEGER value that represents the H3 cell ID (index (https://h3geo.org/docs/core-library/h3Indexing)), or a VARCHAR value that represents the cell ID in hexadecimal format.

返回

返回 BOOLEAN 或 NULL。

  • 如果输入表示五边形,则值为 TRUE。否则返回 FALSE。
  • 如果输入为 NULL,则返回 NULL,不报错。

示例

以下示例指定不表示五边形的整型。

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

以下示例指定表示五边形的十六进制字符串。

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