This topic describes the ST_CurveToLine function. This function converts a CircularString object into a regular LineString object or converts a CurvedPolygon object into a regular Polygon object.
Syntax
geometry ST_CurveToLine(geometry curveGeom , float tolerance , integer toleranceType , integer flags);
Parameters
Parameter | Description |
---|---|
curveGeom | The geometry object that you want to specify. |
tolerance | The tolerance that you want to specify. Default value: 0. |
toleranceType | The interpretation of the tolerance parameter. Valid values:
|
flags | The bitfield that you want to specify. Valid values:
|
Description
- This function converts each curved geometry object or segment into a linear approximation by dividing each quarter circle into 32 segments.
- This function is useful in scenarios in which CircularString objects are not supported.
Examples
Comparison between the returned object by using the default parameter settings and
the returned object by using the custom parameter settings:
select ST_CurveToLine(g),ST_CurveToLine(g,pi()/4,2) from (select 'CIRCULARSTRING(0 0,0.5 0.5,1 0)'::geometry as g) as test;