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

# ST_GeometryType

> Returns the OGC geometry family of a GEOGRAPHY or GEOMETRY value.

Returns the Open Geospatial Consortium (OGC) geometry family of a `GEOGRAPHY` or `GEOMETRY` value.

## Syntax

```sql theme={null}
VARCHAR ST_GeometryType(GEOGRAPHY geography)
VARCHAR ST_GeometryType(GEOMETRY geometry)
```

## Return value

Returns one of `ST_Point`, `ST_LineString`, `ST_Polygon`, `ST_MultiPoint`, `ST_MultiLineString`, `ST_MultiPolygon`, or `ST_GeometryCollection`. A typed EMPTY value retains its family name. Returns `NULL` when the input is `NULL`.

Native compute supports XY values with a valid descriptor. Unsupported dimensions or descriptors produce an error.

## Examples

```SQL theme={null}
SELECT ST_GEOMETRYTYPE(ST_GeogFromText('LINESTRING (0 0, 1 1)'));
-- ST_LineString

SELECT ST_GEOMETRYTYPE(ST_GeogFromText('POINT EMPTY'));
-- ST_Point

SELECT ST_GEOMETRYTYPE(
    ST_GeomFromText('GEOMETRYCOLLECTION (POINT (0 0))', 'EPSG:3857'));
-- ST_GeometryCollection
```

## keyword

ST\_GEOMETRYTYPE,ST,GEOMETRYTYPE

## Related data types

[GEOGRAPHY](/documents/4.2/sql-reference/data-types/spatial-types/GEOGRAPHY.md), [GEOMETRY](/documents/4.2/sql-reference/data-types/spatial-types/GEOMETRY.md), [VARCHAR](/documents/4.2/sql-reference/data-types/string-type/VARCHAR.md)


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