Fork me on GitHub

Convert geometries

The following geometry conversion functions are available:

Function Description
ST_AsBinary Geometry → Well Known Binary
ST_AsGML Geometry → GML
ST_AsText Alias for ST_AsWKT
ST_AsWKT Geometry → Well Known Text
ST_Force2D 3D Geometry → 2D Geometry
ST_GeomFromGML GML → Geometry
ST_GeomFromText Well Known Text → Geometry
ST_GeomFromWKB Well Known Binary → Geometry
ST_GeometryTypeCode Return the OGC SFS type code of a Geometry
ST_GoogleMapLink Geometry → Google map link
ST_Holes Return a Geometry's holes
ST_LineFromText Well Known Text → LINESTRING
ST_LineFromWKB Well Known Binary → LINESTRING
ST_MLineFromText Well Known Text → MULTILINESTRING
ST_MPointFromText Well Known Text → MULTIPOINT
ST_MPolyFromText Well Known Text → MULTIPOLYGON
ST_OSMMapLink Geometry → OSM map link
ST_PointFromText Well Known Text → POINT
ST_PointFromWKB Well Known Binary → POINT
ST_PolyFromText Well Known Text → POLYGON
ST_PolyFromWKB Well Known Binary → POLYGON
ST_ToMultiLine Geometry's coordinates → MULTILINESTRING
ST_ToMultiPoint Geometry's coordinates → MULTIPOINT