PostGIS

Home/PostGIS

PostGIS

Table of Contents

Analyze provides access to the powerful PostGIS library of functions for geospatial analysis. The functions available are shown in the following table and link to instructions on the PostGIS site.

Important

To specify the use of PostGIS functions in expressions, prefix the name with func. For example, using ST_GeogFromText would use func.ST_GeogFromText()

Geometry Constructors #

FunctionDescription
ST_BdPolyFromText < http://postgis.net/do cs/manual-2.2/ST_BdPo lyFromText.html>_Construct a Polygon given an arbitrary collection of closed linestrings as a MultiLineString Well-Known text representation.
ST_BdMPolyFromText <http://postgis.net/d ocs/manual-2.2/ST_BdM PolyFromText.html>_Construct a MultiPolygon given an arbitrary collection of closed linestrings as a MultiLineString text representation Well-Known text representation.
ST_Box2dFromGeoHash <http://postgis.net/ docs/manual-2.2/ST_Bo x2dFromGeoHash.html> __Return a BOX2D from a GeoHash string.
ST_GeogFromText <ht tp://postgis.net/docs /manual-2.2/ST_GeogFr omText.html>__Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeographyFromTex t <http://postgis.net /docs/manual-2.2/ST_G eographyFromText.html >__Return a specified geography value from Well-Known Text representation or extended (WKT).
ST_GeogFromWKB <htt p://postgis.net/docs/ manual-2.2/ST_GeogFro mWKB.html>__Creates a geography instance from a Well-Known Binary geometry representation (WKB) or extended Well Known Binary (EWKB).
ST_GeomCollFromText <http://postgis.net/ docs/manual-2.2/ST_Ge omCollFromText.html> __Makes a collection Geometry from collection WKT with the given SRID. If SRID is not give, it defaults to 0.
ST_GeomFromEWKB <ht tp://postgis.net/docs /manual-2.2/ST_GeomFr omEWKB.html>__Return a specified ST_Geometry value from Extended Well-Known Binary representation (EWKB).
ST_GeomFromEWKT <ht tp://postgis.net/docs /manual-2.2/ST_GeomFr omEWKT.html>__Return a specified ST_Geometry value from Extended Well-Known Text representation (EWKT).
ST_GeometryFromText <http://postgis.net/ docs/manual-2.2/ST_Ge ometryFromText.html> __Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText
ST_GeomFromGeoHash <http://postgis.net/d ocs/manual-2.2/ST_Geo mFromGeoHash.html>__Return a geometry from a GeoHash string.
ST_GeomFromGML <htt p://postgis.net/docs/ manual-2.2/ST_GeomFro mGML.html>__Takes as input GML representation of geometry and outputs a PostGIS geometry object
ST_GeomFromGeoJSON <http://postgis.net/d ocs/manual-2.2/ST_Geo mFromGeoJSON.html>__Takes as input a geojson representation of a geometry and outputs a PostGIS geometry object
ST_GeomFromKML <htt p://postgis.net/docs/ manual-2.2/ST_GeomFro mKML.html>__Takes as input KML representation of geometry and outputs a PostGIS geometry object
ST_GMLToSQL <http:/ /postgis.net/docs/man ual-2.2/ST_GMLToSQL.h tml>__Return a specified ST_Geometry value from GML representation. This is an alias name for ST_GeomFromGML
ST_GeomFromText <ht tp://postgis.net/docs /manual-2.2/ST_GeomFr omText.html>__Return a specified ST_Geometry value from Well-Known Text representation (WKT).
ST_GeomFromWKB <htt p://postgis.net/docs/ manual-2.2/ST_GeomFro mWKB.html>__Creates a geometry instance from a Well-Known Binary geometry representation (WKB) and optional SRID.
ST_LineFromEncodedP olyline <http://postg is.net/docs/manual-2. 2/ST_LineFromEncodedP olyline.html>__Creates a LineString from an Encoded Polyline.
ST_LineFromMultiPoi nt <http://postgis.ne t/docs/manual-2.2/ ST_LineFromMultiPoint .html>__Creates a LineString from a MultiPoint geometry.
ST_LineFromText <ht tp://postgis.net/docs /manual-2.2/ST_LineFr omText.html>__Makes a Geometry from WKT representation with the given SRID. If SRID is not given, it defaults to 0.
ST_LineFromWKB <htt p://postgis.net/docs/ manual-2.2/ST_LineFro mWKB.html>__Makes a LINESTRING from WKB with the given SRID
ST_LinestringFromWK B <http://postgis.net /docs/manual-2.2/ST_L inestringFromWKB.html >__Makes a geometry from WKB with the given SRID.
ST_MakeBox2D <http: //postgis.net/docs/ma nual-2.2/ST_MakeBox2D .html>__Creates a BOX2D defined by the given point geometries.
ST_3DMakeBox <http: //postgis.net/docs/ma nual-2.2/ST_3DMakeBox .html>__Creates a BOX3D defined by the given 3d point geometries.
ST_MakeLine <http:/ /postgis.net/docs/man ual-2.2/ST_MakeLine.h tml>__Creates a Linestring from point or line geometries.
ST_MakeEnvelope <ht tp://postgis.net/docs /manual-2.2/ST_MakeEn velope.html>__Creates a rectangular Polygon formed from the given minimums and maximums. Input values must be in SRS specified by the SRID
ST_MakePolygon <htt p://postgis.net/docs/ manual-2.2/ST_MakePol ygon.html>__Creates a Polygon formed by the given shell. Input geometries must be closed LINESTRINGS.
ST_MakePoint <http: //postgis.net/docs/ma nual-2.2/ST_MakePoint .html>__Creates a 2D,3DZ or 4D point geometry.
ST_MakePointM <http ://postgis.net/docs/m anual-2.2/ST_MakePoin tM.html>__Creates a point geometry with an x, y, and m coordinate.
ST_MLineFromText <h ttp://postgis.net/doc s/manual-2.2/ST_MLine FromText.html>__Return a specified ST_MultiLineString value from WKT representation.
ST_MPointFromText < http://postgis.net/do cs/manual-2.2/ST_MPoi ntFromText.html>__Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to 0.
ST_MPolyFromText <h ttp://postgis.net/doc s/manual-2.2/ST_MPoly FromText.html>__Makes a MultiPolygon Geometry from WKT with the given SRID. If SRID is not give, it defaults to 0.
ST_Point <http://po stgis.net/docs/manual -2.2/ST_Point.html>_ _Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint.
ST_PointFromGeoHash <http://postgis.net/ docs/manual-2.2/ST_Po intFromGeoHash.html> __Return a point from a GeoHash string.
ST_PointFromText <h ttp://postgis.net/doc s/manual-2.2/ST_Point FromText.html>__Makes a point Geometry from WKT with the given SRID. If SRID is not given, it defaults to unknown.
ST_PointFromWKB <ht tp://postgis.net/docs /manual-2.2/ST_PointF romWKB.html>__Makes a geometry from WKB with the given SRID
ST_Polygon <http:// postgis.net/docs/manu al-2.2/ST_Polygon.htm l>__Returns a polygon built from the specified linestring and SRID.
ST_PolygonFromText <http://postgis.net/d ocs/manual-2.2/ST_Pol ygonFromText.html>__Makes a Geometry from WKT with the given SRID. If SRID is not give, it defaults to 0.
ST_WKBToSQL <http:/ /postgis.net/docs/man ual-2.2/ST_WKBToSQL.h tml>__Return a specified ST_Geometry value from Well-Known Binary representation (WKB). This is an alias name for ST_GeomFromWKB that takes no srid
ST_WKTToSQL <http:/ /postgis.net/docs/man ual-2.2/ST_WKTToSQL.h tml>__Return a specified ST_Geometry value from Well-Known Text representation (WKT). This is an alias name for ST_GeomFromText

Go to Top