ST_Simplify

ST_Simplify takes a geometry column and returns a geometry column which contains the simplified geometries. This function simplifies the input geometry according to the OpenGIS Simple Features Implementation Specification for SQL 1.2.1.

FunctionSyntax
Pythonsimplify(geometry)
SQLST_Simplify(geometry)
Scalasimplify(geometry)

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

Examples

PythonPythonSQLScala
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16

from geoanalytics_fabric.sql import functions as ST, Linestring

data = [
    (Linestring([[[5,5],[7,6],[6,6],[6,8]]]), ),
    (Linestring([[[5,5],[7,6],[6,6],[6,6],[5,5]]]), )
]

df = spark.createDataFrame(data, ["linestring"])

df.withColumn("is_simple", ST.is_simple("linestring"))\
  .show(truncate=False)

df.select(ST.simplify("linestring").alias("simplify_linestring"))\
  .withColumn("is_simple", ST.is_simple("simplify_linestring"))\
  .show(truncate=False)
Result
1
2
3
4
5
6
7
8
9
10
11
12
13
+-------------------------------------------+---------+
|linestring                                 |is_simple|
+-------------------------------------------+---------+
|{"paths":[[[5,5],[7,6],[6,6],[6,8]]]}      |true     |
|{"paths":[[[5,5],[7,6],[6,6],[6,6],[5,5]]]}|false    |
+-------------------------------------------+---------+

+-------------------------------------+---------+
|simplify_linestring                  |is_simple|
+-------------------------------------+---------+
|{"paths":[[[5,5],[7,6],[6,6],[6,8]]]}|true     |
|{"paths":[[[5,5],[7,6],[6,6],[5,5]]]}|true     |
+-------------------------------------+---------+

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