H3 索引
resolution,取值范围为 0 到 15,其中 0 是 base 级别,对应最大且最粗粒度的单元。
一组纬度和经度坐标可以转换为一个 64 位 H3 index,用于标识某个网格单元。
H3 index 主要用于对位置进行分桶以及其他地理空间操作。
有关 H3 系统的完整说明,请参阅 Uber Engineering 网站。
h3IsValid
h3index— 六边形索引编号。UInt64。
Query
Response
h3GetResolution
h3index— 六边形索引编号。UInt64。
Query
Response
h3EdgeAngle
resolution— 索引分辨率。UInt8。范围:[0, 15]。
Query
Response
h3EdgeLengthM
resolution— 索引分辨率。UInt8。取值范围:[0, 15]。
Query
Response
h3EdgeLengthKm
resolution— 索引分辨率。UInt8。取值范围:[0, 15]。
Query
Response
geoToH3
(lat, lon)。
语法
geoToH3() 接受的参数顺序为 (lon, lat)。从 ClickHouse v25.5 起,输入值的顺序为 (lat, lon)。可使用设置 geotoh3_argument_order = 'lon_lat' 恢复此前的行为。
示例
Query
Response
h3ToGeo
h3Index— H3 索引。UInt64。
h3ToGeo() 返回值的顺序为 (lon, lat)。从 ClickHouse v25.1 起,返回值的顺序为 (lat, lon)。可以使用设置 h3togeo_lon_lat_result_order = true 恢复之前的行为。
示例
Query
Response
h3ToGeoBoundary
(lat, lon) 对组成的数组,对应于给定 H3 索引的边界。
语法
h3Index— H3 索引。UInt64。
Query
Response
h3kRing
k 半径范围内的所有 H3 六边形。
语法
Query
Response
h3PolygonToCells
Query
Response
h3GetBaseCell
index— 六边形索引编号。UInt64。
- 六边形基础单元编号。UInt8。
Query
Response
h3HexAreaM2
resolution— 索引分辨率。取值范围:[0, 15]。UInt8。
- 以平方米为单位的面积。Float64。
Query
Response
h3HexAreaKm2
resolution— 索引分辨率。范围:[0, 15]。UInt8。
- 以平方千米为单位的面积。Float64。
Query
Response
h3IndexesAreNeighbors
Query
Response
h3ToChildren
Query
Response
h3ToParent
- 父级 H3 索引。UInt64。
Query
Response
h3ToString
H3Index 表示转换为字符串表示形式。
index— 六边形索引编号。UInt64。
- H3 索引的字符串表示形式。String。
Query
Response
stringToH3
H3Index (UInt64) 表示。
语法
index_str— H3 索引的字符串表示形式。String。
- 六边形索引编号。出错时返回 0。UInt64。
Query
Response
h3GetResolution
index— 六边形索引编号。UInt64。
- 索引分辨率。取值范围:
[0, 15]。UInt8。
Query
Response
h3IsResClassIII
index— 六边形索引编号。UInt64。
Query
Response
h3IsPentagon
index— 六边形索引编号。UInt64。
Query
Response
h3GetFaces
index— 六边形索引编号。UInt64。
Query
Response
h3CellAreaM2
index— 六边形索引编号。UInt64
- 单元面积 (平方米) 。Float64
Query
Response
h3CellAreaRads2
index— 六边形索引编号。UInt64。
- 以平方弧度表示的单元面积。Float64。
Query
Response
h3ToCenterChild
Query
Response
h3ExactEdgeLengthM
index— 六边形索引编号。UInt64
- 精确边长,单位为米。Float64
Query
Response
h3ExactEdgeLengthKm
index— 六边形索引编号。UInt64。
- 以千米为单位的精确边长。Float64。
Query
Response
h3ExactEdgeLengthRads
index— 六边形索引编号。UInt64。
- 以弧度表示的精确边长。Float64。
Query
Response
h3NumHexagons
resolution— 索引分辨率。取值范围:[0, 15]。UInt8。
- H3 索引数量。Int64。
Query
Response
h3PointDistM
- 半正矢距离 (或大圆距离) ,单位为米。Float64。
Query
Response
h3PointDistKm
- 半正矢 (大圆) 距离,单位为千米。Float64。
Query
Response
h3PointDistRads
- 以弧度为单位的半正矢距离或大圆距离。Float64。
Query
Response
h3GetRes0Indexes
Query
Response
h3GetPentagonIndexes
resolution— 索引分辨率。取值范围:[0, 15]。UInt8。
Query
Response
h3Line
Query
Response
h3Distance
- 网格单元数量。Int64。
Query
Response
h3HexRing
Query
Response
h3GetUnidirectionalEdge
- 单向边的六边形索引编号。UInt64。
Query
Response
h3UnidirectionalEdgeIsValid
index— 六边形索引编号。UInt64。
Query
Response
h3GetOriginIndexFromUnidirectionalEdge
edge— 表示单向边的六边形索引编号。UInt64.
- 起点六边形索引编号。UInt64.
Query
Response
h3GetDestinationIndexFromUnidirectionalEdge
edge— 表示单向边的六边形索引编号。UInt64。
- 终点六边形索引编号。UInt64。
Query
Response
h3GetIndexesFromUnidirectionalEdge
edge— 表示单向边的六边形索引编号。UInt64。
tuple(origin,destination):
如果提供的输入无效,则返回 (0,0)。
示例
Query
Response
h3GetUnidirectionalEdgesFromHexagon
index— 表示单向边的六边形索引编号。UInt64。
Query
Response
h3GetUnidirectionalEdgeBoundary
index— 表示单向边的六边形索引编号。UInt64。
Query
Response