All Products
Search
Document Center

ApsaraDB RDS:ST_GridDistance

Last Updated:Feb 28, 2024

This topic describes the ST_GridDistance function. This function obtains the distance between two H3 grids.

Syntax

integer ST_GridDistance(h3grid start, h3grid end);

Parameters

Parameter

Description

start

The starting H3 grid object.

end

The end H3 grid object.

Examples

SELECT ST_GridDistance(st_h3fromlatlng(25.1,123.1),st_h3fromlatlng(25.2,123.2));
st_griddistance
-----------------
           17096
(18 rows)