ST_Point takes two numeric columns or double values and returns a point column.
The two numeric columns or values must contain the x,y coordinates of the point geometries. You can optionally
specify a spatial reference for the result point column. The sr
parameter value must be a valid SRID or WKT string.
To create point geometries with a z-coordinate and/or m-value, use ST_PointZ, ST_PointZM, ST_PointM, or ST_MakePoint.
Function | Syntax |
---|---|
Python | point(x, y, sr= |
SQL | ST |
Scala | point(x, y, sr) |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for point.
Examples
from geoanalytics_fabric.sql import functions as ST
df = spark.createDataFrame([(-178.0, -17.0)], ["longitude", "latitude"])
df.select(ST.point("longitude", "latitude", sr=4326).alias("point")).show()
Result
+------------------+
| point|
+------------------+
|{"x":-178,"y":-17}|
+------------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |