- Categories:
H3_ TRY_ GRID_ PATH¶
A special version of H3_GRID_PATH that returns NULL if an error occurs when it attempts to return an array of VARIANT values that contain the IDs of the H3 cells that represent the line between two cells.
语法
实参
cell_id_1An 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.
cell_id_2An 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.
返回
返回 ARRAY 数据类型的值或 NULL。
- If the function performs a successful calculation, returns an array of VARIANT values that contain the IDs of H3 cells
that represent the line between the cells specified by
cell_id_1andcell_id_2. For information about the format of the IDs, see H3_GRID_PATH. - If the line cannot be calculated (for example, when two cells belong to non-neighboring base cells (https://h3geo.org/docs/library/index/cell/)), returns NULL without reporting an error.
使用说明
See H3_GRID_PATH for the usage notes.
示例
以下示例会尝试返回两个单元格之间的行。由于这些单元格属于非相邻的基单元格,因此函数无法返回行,并且返回 NULL。
For examples that successfully calculate the path between two H3 cells, see H3_GRID_PATH.