Name

ST_MakePoint — Creates a Point given its coordinates.

Synopsis

geometry ST_MakePoint(double precision X, double precision Y);

geometry ST_MakePoint(double precision X, double precision Y, double precision Z);

geometry ST_MakePoint(double precision X, double precision Y, double precision Z, double precision M);

Alias

MakePoint, ST_Point,Point

Description

Creates a Point given its coordinates. The point can be 2D (X,Y), 3D (X,Y,Z) or 4D (X,Y,Z,M) where M is a measure.

The OGC function is ST_PointFromText.

Coordinate Dimensions
2D3DM
Spatial Standards Support
OGC SFS for SQL. 1.1 (1999)OGC SFS for SQL. 1.1.0 (2005)OGC SFS for SQL. 1.2.0 (2006)SQL-MM Part 3
----

Examples

--2D Poinnt
SELECT ST_MakePoint(-3.668421,40.423813);

--3D Point
SELECT ST_Asewkt(ST_MakePoint(-3.668421,40.423813,510));

--4D Point
SELECT ST_Asewkt(ST_MakePoint(-3.668421,40.423813,510,8));

--Set SRID of the created point
SELECT ST_SetSRID(MakePoint(-3.668421,40.423813,510),4326);

Related functions

ST_PointFromText, ST_MakePointM