> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# GEOMETRY

> Native spatial type for planar coordinates with an explicit CRS.

`GEOMETRY` is the native SQL type for planar spatial values. Its coordinate reference system (CRS) is part of the type descriptor. Spatial operations use that CRS’s coordinate units. For example, planar distance in `EPSG:3857` uses projected meters. Operations on two planar values may require matching CRS descriptors.

## Distance and area

See [ST\_Distance](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_distance.md) for distance and [ST\_Area](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_area.md) for area. Distance uses the input CRS coordinate unit and area uses its square. For example, EPSG:3857 uses projected meters for distance and projected square meters for area.

## Construct a value

Use [ST\_GeomFromText](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_geometryfromtext.md) for Well-Known Text (WKT) or [ST\_GeomFromWKB](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_geomfromwkb.md) for Well-Known Binary (WKB). Both native constructors require an explicit CRS string literal and accept the seven XY OGC families, including typed `EMPTY` values. The one-argument `ST_GeomFromText(wkt)` returns the legacy `VARCHAR` encoding.

## Query and serialize

```sql theme={null}
SELECT ST_AsText(ST_GeomFromText('POINT (1000 2000)', 'EPSG:3857')) AS point_wkt;
-- POINT (1000 2000)
```

To return a value to the client, serialize it as WKT with [ST\_AsText](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_astext.md) or as WKB with [ST\_AsBinary](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_asbinary.md). To reproject between supported coordinate systems, use [ST\_Transform](/documents/4.2/sql-reference/sql-functions/spatial-functions/st_transform.md). For compatible Iceberg fields, see [Iceberg type mapping](/documents/4.2/data_source/catalog/iceberg/iceberg.md). For spherical longitude and latitude, see [GEOGRAPHY](/documents/4.2/sql-reference/data-types/spatial-types/GEOGRAPHY.md). Browse the [spatial functions](/documents/4.2/sql-reference/sql-functions/spatial-functions/native-spatial-functions.md) by operation.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.