- Categories:
H3_ TRY_ COVERAGE¶
A special version of H3_COVERAGE that returns NULL if an error occurs when it attempts to return an array of IDs (as INTEGER values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).
语法
实参
geography_expressionGEOGRAPHY 对象。
target_resolutionAn INTEGER between 0 and 15 (inclusive) specifying the H3 resolution (https://h3geo.org/docs/core-library/restable) that you want to use for the returned H3 cells.
指定其他任何 INTEGER 值都会导致错误。
返回
返回 INTEGER 值或 NULL 的数组。
- If the function can perform a successful calculation, returns an array of INTEGER values for the IDs of the minimal set of H3 cells that completely cover the specified input shape.
- 如果函数无法执行成功的计算,则返回 NULL 而不报告错误。
使用说明
See H3_COVERAGE for the usage notes.
示例
The following example attempts to return an array of IDs that identify the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object). Because the array with the cells that cover the given hexagon at the given resolution exceeds the allowed size limit, the function returns NULL.
For examples that successfully return an array of IDs, see H3_COVERAGE.