Skip to main content
Converts the input geometry to 4D XYZM representation. Retains original Z and M values if present. Assigning 0.0 defaults if mValue and zValue aren’t specified. The output contains X, Y, Z, and M coordinates. For geometries already in 4D form, the function returns the original geometry unmodified.
Example output is after calling ST_AsText() on returned geometry, which adds Z for in the WKT for 3D geometries
ST_Force4D

Signatures

Parameters

geom
Geometry
The input geometry.
zValue
Double
The Z coordinate value to assign. Defaults to 0.0 if not specified.
mValue
Double
The M (measure) coordinate value to assign. Defaults to 0.0 if not specified.

Return type

The resulting geometry.

Examples