This topic describes the ST_Force2D function. This function forcefully converts a geometry object into a 2D object.

Syntax

geometry  ST_Force2D(geometry  geomA);

Parameters

Parameter Description
geomA The geometry object that you want to specify.

Description

  • The output geometry object contains only the x and y coordinates.
  • This function supports circular strings, curves, polyhedral surfaces, triangles, triangulated irregular network (TIN) surfaces, and 3D objects.

Examples

SELECT ST_AsEWKT(ST_Force2D(ST_GeomFromEWKT('POINT(1 2 3)')));
 st_asewkt
------------
 POINT(1 2)
(1 row)