This topic describes the ST_ForceCurve function. This function converts a geometry object into its curved representation.


geometry  ST_ForceCurve(geometry  g);


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


  • The following list describes the conversions of different geometry objects:
    • A line object is converted into a CompoundCurve object.
    • A MultiLines object is converted into a MultiCurve object.
    • A polygon object is converted into a CurvePolygon object.
    • A MultiPolygons is converted into a MultiSurface object.
  • If the geometry object that you specified is in curved representation, the ST_ForceCurve function returns the original geometry object.
  • This function supports 3D objects and does not delete z coordinates.
  • This function supports circular strings and curves.


SELECT ST_AsText(ST_ForceCurve(ST_GeomFromText('POLYGON((1 1,2 1,2 2,1 2,1 1))')));
 CURVEPOLYGON((1 1,2 1,2 2,1 2,1 1))
(1 row)