Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

H3_FromPoint - Amazon Redshift

H3_FromPoint

H3_FromPoint returns the corresponding H3 cell ID from an input geometry point and resolution. For information about H3 indexing, see H3.

Syntax

H3_FromPoint(geom, resolution)

Arguments

geom

A value of data type GEOMETRY or an expression that evaluates to a GEOMETRY type. The geom must be a POINT.

resolution

A value of data type INTEGER or an expression that evaluates to an INTEGER type. The value represents the resolution of the H3 grid system. The value must be an integer between 0–15, inclusive. With 0 being the coarsest and 15 being the finest.

Return type

BIGINT – represents the H3 cell ID.

If geom is not a POINT, then an error is returned.

If resolution is out of bounds, then an error is returned.

If geom is empty, then NULL is returned.

Examples

The following SQL returns the H3 cell ID from point 0,0, and resolution 10.

SELECT H3_FromPoint(ST_GeomFromText('POINT(0 0)'), 10);
h3_frompoint ------------------- 623560421467684863
PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.