ST_MultiPoint takes an array column and returns a multipoint column. The input array column must contain an array of point geometries.
Function | Syntax |
---|---|
Python | multipoint(points) |
SQL | ST |
Scala | multipoint(points) |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for multipoint.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.
Examples
from geoanalytics_fabric.sql import functions as ST, Point
from pyspark.sql import functions as F
df = spark.createDataFrame([([Point(0, 0), Point(10, 0), Point(20, 0)], )], ["point_array"])
df.select(ST.multipoint("point_array").alias("multipoint")).show(truncate=False)
Result
+--------------------------------+
|multipoint |
+--------------------------------+
|{"points":[[0,0],[10,0],[20,0]]}|
+--------------------------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |