Skip to main content
Given an invalid geometry, create a valid representation of the geometry. Collapsed geometries are either converted to empty (keepCollapsed=false) or a valid geometry of lower dimension (keepCollapsed=true). Default is keepCollapsed=false. ST_MakeValid

Signatures

Parameters

A
Geometry
required
The input geometry.
keepCollapsed
Boolean
The keep collapsed value.

Return type

The resulting geometry.

Example

In Sedona up to and including version 1.2 the behaviour of ST_MakeValid was different.
Be sure to check you code when upgrading. The previous implementation only worked for (multi)polygons and had a different interpretation of the second, boolean, argument. It would also sometimes return multiple geometries for a single geometry input.