Create a POINT geometry from numeric x and y coordinates.
ST_MAKE_POINT(x, y)
## Overview Returns a POINT geometry built from the given x and y coordinates. The argument order follows the standard geometry convention: x first, then y. For geographic data that means longitude first, then latitude. This is the inverse order of many navigation and address APIs, which often emit (latitude, longitude), so take care when building points from external feeds. ST_MAKE_POINT is the fastest way to create a POINT value because it avoids the WKT parser entirely. Use it whenever the coordinates are already in numeric columns or literals. ## When to use ST_MAKE_POINT vs. alternatives - **ST_MAKE_POINT** (this function): fastest constructor for POINT geometries from numeric inputs. Preferred when the data already lives in two DOUBLE columns. - **ST_GEOM_FROM_TEXT**: required for non-POINT geometries (lines, polygons, multis) or when the source is a WKT string. Slower for POINT creation because of the text parser. - **ST_X / ST_Y**: the inverse pair; they extract x and y coordinates from an existing POINT. ## Behavior - Returns a GEOMETRY value of type POINT. - Argument order is (x, y), which for geographic data is (longitude, latitude). - Does not validate ranges. Passing a latitude outside [-90, 90] or a longitude outside [-180, 180] produces a POINT that is numerically valid but not geographically meaningful. - Returns NULL if either argument is NULL. - Does not attach an SRID to the resulting geometry. The caller must track the coordinate system separately. - Round-trips exactly through ST_X and ST_Y; double-precision values are preserved. ## Input format - Accepts any numeric types that implicitly cast to DOUBLE. - Extreme values (infinity, NaN) produce an implementation-defined geometry; validate inputs upstream when the source is untrusted. ## Compatibility - Matches the OGC Simple Features POINT construction semantics. - Output is a pure 2D POINT; Z and M ordinates are not supported by this function. Use a 3D-aware constructor if you need them.
| Name | Type | Description |
|---|---|---|
x | Specifies the X coordinate of the point. For geographic data this is longitude in decimal degrees, in the range -180 to 180. | |
y | Specifies the Y coordinate of the point. For geographic data this is latitude in decimal degrees, in the range -90 to 90. |
-- Argument order is (longitude, latitude) for geographic data.
SELECT ST_MAKE_POINT(-74.0060, 40.7128) AS nyc;
-- Round-trip through ST_AS_TEXT to verify coordinate order.
SELECT ST_AS_TEXT(ST_MAKE_POINT(2.3522, 48.8566)) AS paris_wkt;
-- Turn a table with lng/lat columns into a GEOMETRY column.
SELECT id, ST_MAKE_POINT(lng, lat) AS geom
FROM geo.catalog.poi;
-- Feed the constructed point into ST_CONTAINS.
SELECT customer_id
FROM crm.catalog.customers c
JOIN gis.catalog.service_zones z ON z.zone_id = 'LDN-CENTRAL'
WHERE ST_CONTAINS(z.zone_geom, ST_MAKE_POINT(c.longitude, c.latitude));
-- Distance between two constructed points in CRS units.
SELECT ST_DISTANCE(
ST_MAKE_POINT(-74.0060, 40.7128),
ST_MAKE_POINT(-118.2437, 34.0522)
) AS dist_degrees;
-- ST_X and ST_Y recover the original numeric coordinates.
SELECT ST_X(ST_MAKE_POINT(-74.0060, 40.7128)) AS lng,
ST_Y(ST_MAKE_POINT(-74.0060, 40.7128)) AS lat;