ST_MPointFromText

ST_MPointFromText takes a string column and returns a multipoint column. The string column must contain the well-known text (WKT) representation of multipoint geometries. You can optionally specify a spatial reference for the result multipoint column. The sr parameter value must be a valid SRID or WKT string.

FunctionSyntax
Pythonmpoint_from_text(wkt,sr=None)
SQLST_MPointFromText(wkt,sr)
ScalampointFromText(wkt,sr)

For more details, go to the GeoAnalytics for Microsoft Fabric API reference for mpoint_from_text.

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
9
from geoanalytics_fabric.sql import functions as ST

mpoint_wkt = 'MULTIPOINT (-72.047 -49.292, -72.654 -49.136, -71.921 -49.124, -72.445 -49.026)'

df = spark.createDataFrame([(mpoint_wkt,)], ["wkt"])

df.select(ST.mpoint_from_text("wkt", sr=4326).alias("mpoint_from_text")).show(truncate=False)
Result
Use dark colors for code blocksCopy
1
2
3
4
5
+------------------------------------------------------------------------------------+
|mpoint_from_text                                                                    |
+------------------------------------------------------------------------------------+
|{"points":[[-72.047,-49.292],[-72.654,-49.136],[-71.921,-49.124],[-72.445,-49.026]]}|
+------------------------------------------------------------------------------------+

Version table

ReleaseNotes

1.0.0-beta

Python, SQL, and Scala functions introduced

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