GEOS
3.8.0dev

Unions a collection of Geometry or a single Geometry (which may be a collection) together. More...
#include <UnaryUnionOp.h>
Public Member Functions  
template<class T >  
UnaryUnionOp (const T &geoms, geom::GeometryFactory &geomFactIn)  
template<class T >  
UnaryUnionOp (const T &geoms)  
UnaryUnionOp (const geom::Geometry &geom)  
std::unique_ptr< geom::Geometry >  Union () 
Gets the union of the input geometries. More...  
Static Public Member Functions  
template<typename T >  
static std::unique_ptr < geom::Geometry >  Union (const T &geoms) 
template<class T >  
static std::unique_ptr < geom::Geometry >  Union (const T &geoms, geom::GeometryFactory &geomFact) 
static std::unique_ptr < geom::Geometry >  Union (const geom::Geometry &geom) 
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
By using this specialpurpose operation over a collection of geometries it is possible to take advantage of various optimizations to improve performance. Heterogeneous GeometryCollections are fully supported.
The result obeys the following contract:
UnaryUnion
always operates on the individual components of MultiGeometries. So it is possible to use it to "clean" invalid selfintersecting MultiPolygons (although the polygon components must all still be individually valid.)
std::unique_ptr<geom::Geometry> geos::operation::geounion::UnaryUnionOp::Union  (  ) 
Gets the union of the input geometries.
If no input geometries were provided, a POINT EMPTY is returned.