ST_PointFromText takes a string column and returns a point column.
The string column must contain the well-known text (WKT)
representation of point geometries.
You can optionally specify a spatial reference for the result point column.
The sr
parameter value must be a valid SRID or WKT string.
Function | Syntax |
---|---|
Python | point |
SQL | ST |
Scala | point |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for point_from_text.
This function implements the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.
Examples
from geoanalytics_fabric.sql import functions as ST
df = spark.createDataFrame([('POINT (-72.047 -49.292)',)], ["wkt"])
df.select(ST.point_from_text("wkt", srid=4326).alias("point_from_text")).show(truncate=False)
Result
+-------------------------+
|point_from_text |
+-------------------------+
|{"x":-72.047,"y":-49.292}|
+-------------------------+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |