Geospatial Functions

Geospatial functions operate on values of type GEOGRAPHY, or convert GEOGRAPHY values to and from other representations, such as VARCHAR.

Sub-category

Function

Notes

Conversion/Input/Parsing

TO_GEOGRAPHY

TRY_TO_GEOGRAPHY

ST_GEOGFROMGEOHASH

ST_GEOGRAPHYFROMWKB

ST_GEOGRAPHYFROMWKT

Conversion/Output/Formatting

ST_ASGEOJSON

ST_ASWKB

ST_ASBINARY

Alias for ST_ASWKB

ST_ASEWKB

ST_ASWKT

ST_ASTEXT

Alias for ST_ASWKT

ST_ASEWKT

ST_GEOHASH

Constructor Functions

ST_MAKELINE

ST_MAKEPOINT

ST_POINT

Alias for ST_MAKEPOINT

ST_MAKEPOLYGON

ST_POLYGON

Alias for ST_MAKEPOLYGON

Accessor Functions

ST_DIMENSION

ST_SRID

ST_X

ST_XMAX

ST_XMIN

ST_Y

ST_YMAX

ST_YMIN

Relationship and Measurement Functions

ST_AREA

ST_CONTAINS

ST_COVEREDBY

ST_COVERS

ST_DISTANCE

ST_DWITHIN

ST_INTERSECTS

ST_LENGTH

ST_NPOINTS

ST_NUMPOINTS

Alias for ST_NPOINTS

ST_PERIMETER

ST_WITHIN

Transformation Functions

ST_COLLECT

Scalar

ST_COLLECT

Aggregate

ST_ENVELOPE

ST_SIMPLIFY