ST_MaxM takes a geometry column and returns a double column. The output column contains the maximum m-value of each input geometry.
If the input geometry does not have m-values the function will return Na
.
Function | Syntax |
---|---|
Python | max |
SQL | ST |
Scala | max |
For more details, go to the GeoAnalytics for Microsoft Fabric API reference for max_m.
Examples
from geoanalytics_fabric.sql import functions as ST
line_json = '{"paths": [[[0, 51, 801, 5],[1, 51, 129, 6],[2, 52, 206, 4]]], "hasM":true, "hasZ":true}'
df = spark.createDataFrame([(line_json, )], ["line_json"]) \
.withColumn("geometry", ST.line_from_esri_json("line_json"))
df.select(ST.max_m("geometry").alias("max_m")).show()
Result
+-----+
|max_m|
+-----+
| 6.0|
+-----+
Version table
Release | Notes |
---|---|
1.0.0-beta | Python, SQL, and Scala functions introduced |