ST_MultiPoint

ST_MultiPoint takes an array column and returns a multipoint column. The input array column must contain an array of point geometries.

FunctionSyntax
Pythonmultipoint(points)
SQLST_MultiPoint(points)
Scalamultipoint(points)

For more details, go to the GeoAnalytics Engine API reference for multipoint.

This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.

Examples

PythonPythonSQLScala
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
from geoanalytics.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
Use dark colors for code blocksCopy
1
2
3
4
5
+--------------------------------+
|multipoint                      |
+--------------------------------+
|{"points":[[0,0],[10,0],[20,0]]}|
+--------------------------------+

Version table

ReleaseNotes

1.0.0

Python and SQL functions introduced

1.5.0

Scala function introduced

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.