Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.wherobots.com/llms.txt

Use this file to discover all available pages before exploring further.

Return the result of H3 function cellsToMultiPolygon(cells). Converts an array of Uber H3 cell indices into an array of Polygon geometries, where each polygon represents a hexagonal H3 cell.
To convert a Polygon array to MultiPolygon, use ST_Collect. However, the result may be an invalid geometry. Apply ST_MakeValid to the ST_Collect output to ensure a valid MultiPolygon.An alternative approach to consolidate a Polygon array into a Polygon/MultiPolygon, use the ST_Union function.

Signatures

ST_H3ToGeom(cells: Array[Long])

Parameters

cells
Array[Long]
required
The cells value.

Return type

The resulting geometry.

Example

SELECT ST_H3ToGeom(ST_H3CellIDs(ST_GeomFromWKT('POINT(1 2)'), 8, true)[0], 1, true))
[POLYGON ((1.0057629565405093 1.9984665139177547, 1.0037116327309097 2.0018325249140068, 0.999727799357053 2.001163270465665, 0.9977951427833316 1.997128228393235, 0.9998461908217928 1.993762152933182, 1.0038301712104316 1.9944311839965523, 1.0057629565405093 1.9984665139177547))]
ST_H3ToGeom