2020-07-28 07:57:28 +00:00
|
|
|
|
---
|
2022-08-28 14:53:34 +00:00
|
|
|
|
slug: /en/sql-reference/functions/geo/
|
2022-04-09 13:29:05 +00:00
|
|
|
|
sidebar_label: Geo
|
|
|
|
|
sidebar_position: 62
|
2020-07-28 07:57:28 +00:00
|
|
|
|
---
|
|
|
|
|
|
2022-06-29 02:24:06 +00:00
|
|
|
|
# Geo Functions
|
|
|
|
|
|
|
|
|
|
## Geographical Coordinates Functions
|
|
|
|
|
|
|
|
|
|
- [greatCircleDistance](./coordinates.md#greatCircleDistance)
|
|
|
|
|
- [geoDistance](./coordinates.md#geoDistance)
|
|
|
|
|
- [greatCircleAngle](./coordinates.md#greatCircleAngle)
|
|
|
|
|
- [pointInEllipses](./coordinates.md#pointInEllipses)
|
|
|
|
|
- [pointInPolygon](./coordinates.md#pointInPolygon)
|
|
|
|
|
|
|
|
|
|
## Geohash Functions
|
|
|
|
|
- [geohashEncode](./geohash.md#geohashEncode)
|
|
|
|
|
- [geohashDecode](./geohash.md#geohashDecode)
|
|
|
|
|
- [geohashesInBox](./geohash.md#geohashesInBox)
|
|
|
|
|
|
|
|
|
|
## H3 Indexes Functions
|
|
|
|
|
|
2022-06-29 19:21:05 +00:00
|
|
|
|
- [h3IsValid](./h3.md#h3IsValid)
|
|
|
|
|
- [h3GetResolution](./h3.md#h3GetResolution)
|
|
|
|
|
- [h3EdgeAngle](./h3.md#h3EdgeAngle)
|
|
|
|
|
- [h3EdgeLengthM](./h3.md#h3EdgeLengthM)
|
|
|
|
|
- [h3EdgeLengthKm](./h3.md#h3EdgeLengthKm)
|
|
|
|
|
- [geoToH3](./h3.md#geoToH3)
|
|
|
|
|
- [h3ToGeo](./h3.md#h3ToGeo)
|
|
|
|
|
- [h3ToGeoBoundary](./h3.md#h3ToGeoBoundary)
|
|
|
|
|
- [h3kRing](./h3.md#h3kRing)
|
|
|
|
|
- [h3GetBaseCell](./h3.md#h3GetBaseCell)
|
|
|
|
|
- [h3HexAreaM2](./h3.md#h3HexAreaM2)
|
|
|
|
|
- [h3HexAreaKm2](./h3.md#h3HexAreaKm2)
|
|
|
|
|
- [h3IndexesAreNeighbors](./h3.md#h3IndexesAreNeighbors)
|
|
|
|
|
- [h3ToChildren](./h3.md#h3ToChildren)
|
|
|
|
|
- [h3ToParent](./h3.md#h3ToParent)
|
|
|
|
|
- [h3ToString](./h3.md#h3ToString)
|
|
|
|
|
- [stringToH3](./h3.md#stringToH3)
|
|
|
|
|
- [h3GetResolution](./h3.md#h3GetResolution)
|
|
|
|
|
- [h3IsResClassIII](./h3.md#h3IsResClassIII)
|
|
|
|
|
- [h3IsPentagon](./h3.md#h3IsPentagon)
|
|
|
|
|
- [h3GetFaces](./h3.md#h3GetFaces)
|
|
|
|
|
- [h3CellAreaM2](./h3.md#h3CellAreaM2)
|
|
|
|
|
- [h3CellAreaRads2](./h3.md#h3CellAreaRads2)
|
|
|
|
|
- [h3ToCenterChild](./h3.md#h3ToCenterChild)
|
|
|
|
|
- [h3ExactEdgeLengthM](./h3.md#h3ExactEdgeLengthM)
|
|
|
|
|
- [h3ExactEdgeLengthKm](./h3.md#h3ExactEdgeLengthKm)
|
|
|
|
|
- [h3ExactEdgeLengthRads](./h3.md#h3ExactEdgeLengthRads)
|
|
|
|
|
- [h3NumHexagons](./h3.md#h3NumHexagons)
|
|
|
|
|
- [h3Line](./h3.md#h3Line)
|
|
|
|
|
- [h3Distance](./h3.md#h3Distance)
|
|
|
|
|
- [h3HexRing](./h3.md#h3HexRing)
|
|
|
|
|
- [h3GetUnidirectionalEdge](./h3.md#h3GetUnidirectionalEdge)
|
|
|
|
|
- [h3UnidirectionalEdgeIsValid](./h3.md#h3UnidirectionalEdgeIsValid)
|
|
|
|
|
- [h3GetOriginIndexFromUnidirectionalEdge](./h3.md#h3GetOriginIndexFromUnidirectionalEdge)
|
|
|
|
|
- [h3GetDestinationIndexFromUnidirectionalEdge](./h3.md#h3GetDestinationIndexFromUnidirectionalEdge)
|
|
|
|
|
- [h3GetIndexesFromUnidirectionalEdge](./h3.md#h3GetIndexesFromUnidirectionalEdge)
|
|
|
|
|
- [h3GetUnidirectionalEdgesFromHexagon](./h3.md#h3GetUnidirectionalEdgesFromHexagon)
|
|
|
|
|
- [h3GetUnidirectionalEdgeBoundary](./h3.md#h3GetUnidirectionalEdgeBoundary)
|
2022-06-29 02:24:06 +00:00
|
|
|
|
|
|
|
|
|
## S2 Index Functions
|
|
|
|
|
|
2022-06-29 19:21:05 +00:00
|
|
|
|
- [geoToS2](./s2.md#geoToS2)
|
|
|
|
|
- [s2ToGeo](./s2.md#s2ToGeo)
|
|
|
|
|
- [s2GetNeighbors](./s2.md#s2GetNeighbors)
|
|
|
|
|
- [s2CellsIntersect](./s2.md#s2CellsIntersect)
|
|
|
|
|
- [s2CapContains](./s2.md#s2CapContains)
|
|
|
|
|
- [s2CapUnion](./s2.md#s2CapUnion)
|
|
|
|
|
- [s2RectAdd](./s2.md#s2RectAdd)
|
|
|
|
|
- [s2RectContains](./s2.md#s2RectContains)
|
|
|
|
|
- [s2RectUinion](./s2.md#s2RectUinion)
|
|
|
|
|
- [s2RectIntersection](./s2.md#s2RectIntersection)
|
2022-06-29 02:24:06 +00:00
|
|
|
|
|
2020-07-28 07:57:28 +00:00
|
|
|
|
|
2021-09-19 20:05:54 +00:00
|
|
|
|
[Original article](https://clickhouse.com/docs/en/sql-reference/functions/geo/) <!--hide-->
|