- Categories:
H3_ COVERAGE_ STRINGS¶
Returns an array of hexadecimal IDs (as VARCHAR values) identifying the minimal set of H3 cells that completely cover a shape (specified by a GEOGRAPHY object).
Syntax¶
Arguments¶
geography_expressionA GEOGRAPHY object.
target_resolutionAn INTEGER between 0 and 15 (inclusive) specifying the H3 resolution that you want to use for the returned H3 cells.
Specifying any other INTEGER value results in an error.
Returns¶
Returns an ARRAY of VARCHAR values for the hexadecimal IDs of the minimal set of H3 cells that completely cover the specified input shape.
Usage notes¶
- The function uses spherical approximation, which treats points on the Earth’s surface as if they were connected by arcs, rather than straight lines. If you need a planar approximation, use H3_POLYGON_TO_CELLS_STRINGS instead.
- A cell is included in the result set if its boundary intersects the input shape.
- If it isn’t possible to compute the coverage for an invalid GEOGRAPHY object, the function returns NULL. For more information, see Effects on GEOGRAPHY objects.
- If the number of H3 cells that cover the input shape exceeds the allowed limit, the function reports an error. To return NULL instead of reporting an error, use H3_TRY_COVERAGE_STRINGS.
Examples¶
The following example returns an ARRAY of the hexadecimal IDs that identify the minimal set of H3 cells that completely cover the specified Polygon.