geo_h3cell_to_central_point()

Calculates the geospatial coordinates that represent the center of an H3 Cell.

Read more about H3 Cell.

Syntax

geo_h3cell_to_central_point(h3cell)

Arguments

h3cell: H3 cell token string value as it was calculated by geo_point_to_h3cell().

Returns

The geospatial coordinate values in GeoJSON Format and of a dynamic data type. If the H3 cell token is invalid, the query will produce a null result.

Note

The GeoJSON format specifies longitude first and latitude second.

Examples

print h3cell = geo_h3cell_to_central_point("862a1072fffffff")
h3cell
{
"type": "Point",
"coordinates": [-74.016008479792447, 40.7041679083504]
}

The following example returns the longitude of the H3 Cell center point:

print longitude = geo_h3cell_to_central_point("862a1072fffffff").coordinates[0]
longitude
-74.0160084797924

The following example returns a null result because of the invalid H3 cell token input.

print h3cell = geo_h3cell_to_central_point("1")
h3cell