> ## Documentation Index
> Fetch the complete documentation index at: https://firebolt-aggregate-helm-docs-pr-97.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Geospatial functions

> Snowflake geospatial functions supported in Snowflake compatibility mode.

<span className="feature-tag">Preview</span>

Snowflake [geospatial functions](https://docs.snowflake.com/en/sql-reference/functions-geospatial) in [Snowflake compatibility mode](/reference-sql/snowflake/overview).

| Function                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           | Support          | Notes                                                                                                                             |
| :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------- | :-------------------------------------------------------------------------------------------------------------------------------- |
| [`TO_GEOGRAPHY`](https://docs.snowflake.com/en/sql-reference/functions/to_geography)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | With limitations | Parses WKT. The value renders as WKB hex where Snowflake renders GeoJSON, and coordinates are quantized rather than kept exactly. |
| [`ST_MAKEPOINT`](https://docs.snowflake.com/en/sql-reference/functions/st_makepoint), [`ST_POINT`](https://docs.snowflake.com/en/sql-reference/functions/st_makepoint), [`ST_GEOMPOINT`](https://docs.snowflake.com/en/sql-reference/functions/st_makepoint), [`ST_MAKEGEOMPOINT`](https://docs.snowflake.com/en/sql-reference/functions/st_makepoint)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             | With limitations | One function here. Renders as WKB hex, as above.                                                                                  |
| [`ST_ASTEXT`](https://docs.snowflake.com/en/sql-reference/functions/st_astext), [`ST_ASGEOJSON`](https://docs.snowflake.com/en/sql-reference/functions/st_asgeojson)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Supported        | The portable ways to read a geography back.                                                                                       |
| [`ST_X`](https://docs.snowflake.com/en/sql-reference/functions/st_x), [`ST_Y`](https://docs.snowflake.com/en/sql-reference/functions/st_y)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                                                                                                                   |
| [`ST_CONTAINS`](https://docs.snowflake.com/en/sql-reference/functions/st_contains), [`ST_COVERS`](https://docs.snowflake.com/en/sql-reference/functions/st_covers), [`ST_INTERSECTS`](https://docs.snowflake.com/en/sql-reference/functions/st_intersects)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Supported        |                                                                                                                                   |
| [`ST_DISTANCE`](https://docs.snowflake.com/en/sql-reference/functions/st_distance)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Supported        |                                                                                                                                   |
| [`ST_ASBINARY`](https://docs.snowflake.com/en/sql-reference/functions/st_asbinary), [`ST_ASEWKB`](https://docs.snowflake.com/en/sql-reference/functions/st_asewkb)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | With limitations | Returned as hex text rather than as a binary value.                                                                               |
| `H3_CELL_TO_BOUNDARY`, `H3_CELL_TO_CHILDREN`, `H3_CELL_TO_CHILDREN_STRING`, `H3_CELL_TO_CHILDREN_STRINGS`, `H3_CELL_TO_POINT`, `H3_COMPACT_CELLS`, `H3_COMPACT_CELLS_STRINGS`, `H3_COVERAGE`, `H3_COVERAGE_STRINGS`, `H3_GET_RESOLUTION`, `H3_GRID_DISK`, `H3_GRID_DISTANCE`, `H3_GRID_PATH`, `H3_INT_TO_STRING`, `H3_IS_PENTAGON`, `H3_IS_VALID_CELL`, `H3_LATLNG_TO_CELL`, `H3_LATLNG_TO_CELL_STRING`, `H3_POINT_TO_CELL`, `H3_POINT_TO_CELL_STRING`, `H3_STRING_TO_INT`, `H3_TRY_COVERAGE`, `H3_TRY_COVERAGE_STRINGS`, `H3_TRY_GRID_DISTANCE`, `H3_TRY_GRID_PATH`, `H3_TRY_POLYGON_TO_CELLS`, `H3_TRY_POLYGON_TO_CELLS_STRINGS`, `H3_UNCOMPACT_CELLS`, `H3_UNCOMPACT_CELLS_STRINGS`, `HAVERSINE`, `ST_AREA`, `ST_ASEWKT`, `ST_ASWKB`, `ST_ASWKT`, `ST_AZIMUTH`, `ST_BUFFER`, `ST_CENTROID`, `ST_COLLECT`, `ST_COVEREDBY`, `ST_DIFFERENCE`, `ST_DIMENSION`, `ST_DISJOINT`, `ST_DWITHIN`, `ST_ENVELOPE`, `ST_GEOHASH`, `ST_HAUSDORFFDISTANCE`, `ST_INTERSECTION`, `ST_INTERSECTION_AGG`, `ST_ISREPAIRED`, `ST_ISVALID`, `ST_LENGTH`, `ST_MAKELINE`, `ST_NPOINTS`, `ST_NUMPOINTS`, `ST_PERIMETER`, `ST_SETSRID`, `ST_SIMPLIFY`, `ST_SRID`, `ST_SYMDIFFERENCE`, `ST_UNION`, `ST_UNION_AGG`, `ST_WITHIN`, `ST_XMAX`, `ST_XMIN`, `ST_YMAX`, `ST_YMIN` | Not supported    |                                                                                                                                   |

## Limitations

A `GEOGRAPHY` renders as WKB hex, where Snowflake renders GeoJSON. The shape is the same, but a client reading the output text sees something different. `ST_ASTEXT` and `ST_ASGEOJSON` return the same text in both systems and are the portable way to read one.

Coordinates are quantized when a geography is built, so a value does not necessarily come back unchanged: `ST_X(TO_GEOGRAPHY('POINT(1 2)'))` returns `0.9999999999999998` here and `1` in Snowflake. This matters for an equality test on a coordinate, and not for a distance or a containment check.

The `H3_*` family and the geometry (planar) functions have no equivalent; see [Data types](/reference-sql/snowflake/data-types) for why `GEOMETRY` is not supported.
