# geography

> For the complete documentation index, see [llms.txt](https://docs.redpanda.com/llms.txt). Component-specific: [cloud-data-platform-full.txt](https://docs.redpanda.com/cloud-data-platform-full.txt)

---
title: geography
latest-operator-version: v26.1.4
latest-console-tag: v3.7.3
latest-connect-version: 4.93.0
latest-redpanda-tag: v26.1.9
docname: sql/sql-data-types/geography
page-component-name: cloud-data-platform
page-version: master
page-component-version: master
page-component-title: Cloud
page-relative-src-path: sql/sql-data-types/geography.adoc
page-edit-url: https://github.com/redpanda-data/cloud-docs/edit/main/modules/reference/pages/sql/sql-data-types/geography.adoc
description: The `geography` data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326).
page-topic-type: reference
page-git-created-date: "2026-05-26"
page-git-modified-date: "2026-05-26"
---

<!-- Source: https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-data-types/geography.md -->

The `geography` data type stores geodetic (spherical) spatial point values using the WGS84 coordinate system (SRID 4326). Unlike [`geometry`](https://docs.redpanda.com/cloud-data-platform/reference/sql/sql-data-types/geometry/), which uses planar coordinates, `geography` interprets coordinates as longitude and latitude on the Earth’s surface, and distance calculations return results in meters.

> 📝 **NOTE**
>
> Redpanda SQL supports only `POINT` geographies. Multi-part geometries such as `POLYGON`, `LINESTRING`, and `MULTIPOINT` are not supported.

## [](#format)Format

`geography` values can be specified in the following formats:

-   WKT: `POINT(longitude latitude)` (SRID defaults to 4326)

-   EWKT: `SRID=4326;POINT(longitude latitude)`

-   EWKB: A hex-encoded binary string (50 hex characters, includes SRID)


```sql
SELECT GEOGRAPHY 'POINT(-73.9857 40.7484)';
```

## [](#srid-handling)SRID handling

`geography` always uses SRID 4326 (WGS84). If you specify a different SRID, an error is returned.

## [](#casting)Casting

`geography` supports the following casts:

-   `geography` → `text`: Returns EWKB hex string

-   `text` → `geography`: Parses WKT or EWKB string

-   `geography` → `geometry`: Removes SRID

-   `geometry` → `geography`: Adds SRID=4326


> 📝 **NOTE**
>
> Casting between `geography` and `point` is not supported.

## [](#functions)Functions

The following functions work with `geography` values:

| Function | Description | Return type |
| --- | --- | --- |
| st_astext(geography) | Returns the WKT representation | text |
| st_astext(geography, max_digits) | Returns the WKT representation with limited decimal digits | text |
| st_asewkt(geography) | Returns the Extended WKT representation (includes SRID) | text |
| st_asewkt(geography, max_digits) | Returns the Extended WKT representation with limited decimal digits | text |
| st_distance(geography, geography) | Returns the geodetic distance in meters using the WGS84 ellipsoid | double precision |
| st_distance(geography, geography, use_spheroid) | Returns the geodetic distance in meters. Set use_spheroid to false for a faster spherical approximation. | double precision |

## [](#examples)Examples

Calculate the distance in meters between two geographic points (New York City and London):

```sql
SELECT ST_DISTANCE(
  GEOGRAPHY 'POINT(-73.9857 40.7484)',
  GEOGRAPHY 'POINT(-0.1278 51.5074)'
) AS distance_meters;
```

```sql
  distance_meters
-------------------
 5570222.179854498
```