- Categories:
H3_ POLYGON_ TO_ CELLS¶
Returns an array of INTEGER values of the IDs of H3 cells that have centroids contained by a Polygon (specified by a GEOGRAPHY object).
- See also:
语法
实参
geography_polygon表示多边形的 GEOGRAPHY 对象。
target_resolutionAn INTEGER between 0 and 15 (inclusive) that specifies the H3 resolution (https://h3geo.org/docs/core-library/restable) that you want to use for the returned H3 cells.
指定其他任何 INTEGER 值都会导致错误。
返回
返回 H3 单元格的 IDs 的 INTEGER 值数组,H3 单元格的质心包含在指定的输入多边形内。
使用说明
- The function uses planar approximation, which treats points on the Earth’s surface as if they were connected by straight lines, rather than curved arcs. If you need a spherical approximation, use H3_COVERAGE instead.
- 如果单元格的质心包含在多边形内,则认为该单元格位于多边形内。
- When you apply FLATTEN to the array returned by the function, cast each value explicitly to an integer.
示例
以下示例返回 H3 单元格 IDs 的 ARRAY,H3 单元格的质心包含在指定的多边形中。