GEOS
3.9.1dev
|
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) | |
void | setUnionFunction (UnionStrategy *unionFun) |
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) |
Private Member Functions | |
template<typename T > | |
void | extractGeoms (const T &geoms) |
void | extract (const geom::Geometry &geom) |
std::unique_ptr< geom::Geometry > | unionNoOpt (const geom::Geometry &g0) |
std::unique_ptr< geom::Geometry > | unionWithNull (std::unique_ptr< geom::Geometry > g0, std::unique_ptr< geom::Geometry > g1) |
Private Attributes | |
std::vector< const geom::Polygon * > | polygons |
std::vector< const geom::LineString * > | lines |
std::vector< const geom::Point * > | points |
const geom::GeometryFactory * | geomFact |
std::unique_ptr< geom::Geometry > | empty |
UnionStrategy * | unionFunction |
ClassicUnionStrategy | defaultUnionFunction |
Unions a collection of Geometry or a single Geometry (which may be a collection) together.
By using this special-purpose 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 self-intersecting MultiPolygons (although the polygon components must all still be individually valid.)
Definition at line 89 of file UnaryUnionOp.h.
|
inline |
Definition at line 117 of file UnaryUnionOp.h.
|
inline |
Definition at line 125 of file UnaryUnionOp.h.
|
inline |
Definition at line 132 of file UnaryUnionOp.h.
|
inlineprivate |
Definition at line 173 of file UnaryUnionOp.h.
References geos::geom::Geometry::getFactory().
|
inlineprivate |
Definition at line 160 of file UnaryUnionOp.h.
|
inline |
Definition at line 139 of file UnaryUnionOp.h.
|
inlinestatic |
Definition at line 94 of file UnaryUnionOp.h.
References Union().
Referenced by Union().
|
inlinestatic |
Definition at line 102 of file UnaryUnionOp.h.
References Union().
|
inlinestatic |
Definition at line 110 of file UnaryUnionOp.h.
References Union().
std::unique_ptr<geom::Geometry> geos::operation::geounion::UnaryUnionOp::Union | ( | ) |
Gets the union of the input geometries.
If no input geometries were provided, an empty GEOMETRYCOLLECTION is returned.
|
inlineprivate |
Computes a unary union with no extra optimization, and no short-circuiting. Due to the way the overlay operations are implemented, this is still efficient in the case of linear and puntal geometries. Uses robust version of overlay operation to ensure identical behaviour to the union(Geometry)
operation.
g0 | a geometry |
Definition at line 199 of file UnaryUnionOp.h.
|
private |
Computes the union of two geometries, either of both of which may be null.
g0 | a Geometry (ownership transferred) |
g1 | a Geometry (ownership transferred) |
|
private |
Definition at line 234 of file UnaryUnionOp.h.
|
private |
Definition at line 231 of file UnaryUnionOp.h.
|
private |
Definition at line 230 of file UnaryUnionOp.h.
|
private |
Definition at line 227 of file UnaryUnionOp.h.
|
private |
Definition at line 228 of file UnaryUnionOp.h.
|
private |
Definition at line 226 of file UnaryUnionOp.h.
|
private |
Definition at line 233 of file UnaryUnionOp.h.