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 Runtime 17.1 and above
Important
This feature is in Public Preview.
Returns a point GEOMETRY
with the given x and y coordinates and SRID value, if provided.
Syntax
st_point ( x, y [, srid] )
Arguments
x
: ADOUBLE
value, representing the first coordinate of a point.y
: ADOUBLE
value, 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