Skip to content
🌵SedonaDB (Rust) 0.3.0 is out now, featuring larger-than-memory spatial joins, and row-level CRS!

Geography Functions

The Geography type in Sedona represents spatial objects on a spherical (geodesic) model of the Earth. Unlike the planar Geometry type, distance, area, and other measurements performed on Geography objects account for the curvature of the Earth and return results in real-world units (e.g., meters).

Geography Constructors

These functions create geography objects from various formats.

Function Return type Description Since
ST_GeogFromEWKB Geography Construct a Geography from EWKB Binary. This function is an alias of ST_GeogFromWKB. v1.8.0
ST_GeogFromEWKT Geography Construct a Geography from OGC Extended WKT. v1.8.0
ST_GeogFromGeoHash Geography Create Geography from geohash string and optional precision v1.8.0
ST_GeogFromWKB Geography Construct a Geography from WKB Binary. v1.8.0
ST_GeogFromWKT Geography Construct a Geography from WKT. If SRID is not set, it defaults to 0 (unknown). v1.8.0
ST_GeogToGeometry Geometry This function constructs a planar Geometry object from a Geography. While Sedona makes every effort to preserve the original spatial object, the conversion is not always exact because Geography and... v1.8.0
ST_GeomToGeography Geography This function constructs a Geography object from a planar Geometry. This function is intended for geometries defined in a Geographic Coordinate Reference System (CRS), most commonly WGS84 (EPSG:432... v1.8.0

Geography Functions

These functions operate on geography type objects.

Function Return type Description Since
ST_AsEWKT String Return the Extended Well-Known Text representation of a geography. EWKT is an extended version of WKT which includes the SRID of the geography. The format originated in PostGIS but is supported by ... v1.8.0
ST_Envelope Geography This function returns the bounding box (envelope) of A. It's important to note that the bounding box is calculated using a cylindrical topology, not a spherical one. If the envelope crosses the ant... v1.8.0