Skip to content
🎉 Apache Sedona 1.8.1 is now available! Check out the new features and improvements.

ST_Force_2D

Introduction: Forces the geometries into a "2-dimensional mode" so that all output representations will only have the X and Y coordinates. This function is an alias of ST_Force2D.

Format: ST_Force_2D (A: Geometry)

Since: v1.2.1

SQL Example

SELECT ST_Force_2D(ST_GeomFromText('POLYGON((0 0 2,0 5 2,5 0 2,0 0 2),(1 1 2,3 1 2,1 3 2,1 1 2))'))

Output:

POLYGON((0 0,0 5,5 0,0 0),(1 1,3 1,1 3,1 1))