ST_MPointFromShape

ST_MPointFromShape takes a binary column and returns a multipoint column. The input binary column must contain the shapefile 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. If a multipoint cannot be created from the input binary the function will return null.

FunctionSyntax
Pythonmpoint_from_shape(shp,sr=None)
SQLST_MPointFromShape(shp,sr)
ScalampointFromShape(shp,sr)

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

Examples

PythonPythonSQLScala
1
2
3
4
5
6
7
8

from geoanalytics_fabric.sql import functions as ST

mpoint_shape = bytearray(b'\x08\x00\x00\x00R\xb8\x1e%\xb4RH\xc1\xaeG\xe1zO\xe9^AH\xe1z\xf4z=G\xc1\x00\x00\x00\xf03>_A\x03\x00\x00\x00\xc3\xf5(\\\xc1\x1bH\xc1\x00\x00\x00\xf03>_AH\xe1z\xf4z=G\xc1\x00\x00\x00\xf03>_AR\xb8\x1e%\xb4RH\xc1\xaeG\xe1zO\xe9^A')

df = spark.createDataFrame([(mpoint_shape, )], ["shape"])

df.select(ST.mpoint_from_shape("shape", sr=54008).alias("mpoint_from_shape")).show(truncate=False)
Result
1
2
3
4
5
+---------------------------------------------------------------------------------------+
|mpoint_from_shape                                                                      |
+---------------------------------------------------------------------------------------+
|{"points":[[-3159938.72,8190159.75],[-3046133.91,8190159.75],[-3188072.29,8103229.92]]}|
+---------------------------------------------------------------------------------------+

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.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close