GEOGRAPHY is the native SQL type for spatial values on the Earth’s sphere. Coordinates use OGC:CRS84 with SRID 4326 and have longitude (X) followed by latitude (Y), in degrees. The supported ranges are −180 to 180 for longitude and −90 to 90 for latitude. Edges follow spherical semantics; supported distance and area functions return meters and square meters.
Distance and area
See ST_Distance for distance and ST_Area for area. Distance is in meters and area is in square meters.Construct a value
Use ST_GeogFromText for Well-Known Text (WKT) or ST_GeogFromWKB for Well-Known Binary (WKB). If you supply an SRID, it must be 4326. These constructors accept the seven XY OGC families, including typedEMPTY values. Function support varies by family.
Query and serialize
GEOGRAPHY can also be returned directly to a client as WKB. For compatible Iceberg fields, see Iceberg type mapping. For planar coordinates and computations, see GEOMETRY. Browse the spatial functions by operation.