GEOS
3.9.0dev

The function attempts to create a valid representation of a given invalid geometry without losing any of the input vertices. More...
#include <MakeValid.h>
Public Member Functions  
MakeValid ()=default  
Create a MakeValid object.  
std::unique_ptr< geom::Geometry >  build (const geom::Geometry *geom) 
Return a valid version of the input geometry.  
The function attempts to create a valid representation of a given invalid geometry without losing any of the input vertices.
Alreadyvalid geometries are returned without further intervention.
Supported inputs are: POINTS, MULTIPOINTS, LINESTRINGS, MULTILINESTRINGS, POLYGONS, MULTIPOLYGONS and GEOMETRYCOLLECTIONS containing any mix of them.
In case of full or partial dimensional collapses, the output geometry may be a collection of lowertoequal dimension geometries or a geometry of lower dimension.
Single polygons may become multigeometries in case of selfintersections.