Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to:
Databricks SQL
Databricks Runtime 17.1 and above
Important
This feature is in Public Preview.
Note
This feature is not available on Databricks SQL Classic warehouses. To learn more about Databricks SQL warehouses, see SQL warehouse types.
Returns a point GEOMETRY value with the given X and Y coordinates and SRID value, if provided.
Syntax
st_point ( x, y [, srid] )
Arguments
x: ADOUBLEvalue, representing the first coordinate of a point.y: ADOUBLEvalue, representing the second coordinate of a point.srid: The optional SRID value of the point. Default is 0.
Returns
A value of type GEOMETRY, representing a point with the specified coordinates.
The function returns NULL if any of the inputs is NULL.
Examples
-- Creates a point with coordinates (10, 34) and default SRID 0.
> SELECT st_astext(st_point(10.0, 34.0));
POINT(10 34)
-- Returns the SRID of a point created with default SRID.
> SELECT st_srid(st_point(10.0, 34.0));
0
-- Creates a point with coordinates (10, 34) and SRID 3857.
> SELECT st_srid(st_point(10.0, 34.0, 3857));
3857