ST_AsShape takes a geometry column and returns the shapefile representation of the geometry as a binary column.
| Function | Syntax | 
|---|---|
| Python | as | 
| SQL | ST | 
| Scala | as | 
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for as_shape.
Examples
from geoanalytics_fabric.sql import functions as ST, Point
df = spark.createDataFrame([(Point(-178, -17),)], ["point"])
df.select(ST.as_shape("point").alias("as_shape")).show(truncate=False)Result
+-------------------------------------------------------------+
|as_shape                                                     |
+-------------------------------------------------------------+
|[01 00 00 00 00 00 00 00 00 40 66 C0 00 00 00 00 00 00 31 C0]|
+-------------------------------------------------------------+Version table
| Release | Notes | 
|---|---|
1.0.0-beta  | Python, SQL, and Scala functions introduced  |