Skip to main content
Returns a line at a given offset distance from a linear geometry. If the distance is positive, the offset is on the left side of the input line; if it is negative, it is on the right side. Returns null for empty geometries. The optional third parameter quadrantSegments controls the number of line segments used to approximate a quarter circle at round joins. The default value is 8.

Signatures

Parameters

Geometry
required
The linear geometry to offset.
Double
required
The offset distance. Positive offsets to the left of the line; negative to the right.
Integer
The number of segments used to approximate a quarter circle at round joins. Defaults to 8.

Return type

The offset line.

Example

ST_OffsetCurve with a positive offset
With a negative distance (offset to the right): ST_OffsetCurve with a negative offset
With quadrantSegments set to 16: ST_OffsetCurve with quadrantSegments