ST_Point — Returns an ST_Point with the given coordinate values. OGC alias for ST_MakePoint.


geometry ST_Point(float x_lon, float y_lat);


Returns an ST_Point with the given coordinate values. MM compliant alias for ST_MakePoint that takes just an x and y.

This method implements the SQL/MM specification. SQL-MM 3: 6.1.2

Examples: Geometry

SELECT ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326)

Examples: Geography

SELECT CAST(ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326) As geography);
-- the :: is PostgreSQL short-hand for casting.
SELECT ST_SetSRID(ST_Point(-71.1043443253471, 42.3150676015829),4326)::geography;
--If your point coordinates are in a different spatial reference from WGS-84 long lat, then you need to transform before casting
-- This example we convert a point in Pennsylvania State Plane feet to WGS 84 and then geography
SELECT ST_Transform(ST_SetSRID(ST_Point(3637510, 3014852),2273),4326)::geography;

See Also

Section 4.2.1, “Geography Basics”, ST_MakePoint, ST_SetSRID, ST_Transform