ST_MakePoint takes two numeric columns and returns a point column.
The two input columns must contain the x,y coordinates of the points respectively. You can optionally specify two additional input
columns with z-coordinates and m-values. The spatial reference of the result column will always be 0
and should be set to
a valid ID using ST_SRID.
Function | Syntax |
---|---|
Python | make |
SQL | ST |
Scala | make |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for make_point.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.
Examples
from geoanalytics_fabric.sql import functions as ST
df = spark.createDataFrame([(-178, -17, 10, 100)], ["x", "y", "z", "m"])
df.select(ST.make_point(x="x",y="y",z="z",m="m").alias("make_point")).show(truncate=False)
+---------------------------------+
|make_point |
+---------------------------------+
|{"x":-178,"y":-17,"z":10,"m":100}|
+---------------------------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |