Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | Related Pages

geos::operation::geounion::CascadedPolygonUnion Class Reference

Provides an efficient method of unioning a collection of Polygonal geometries. This algorithm is faster and likely more robust than the simple iterated approach of repeatedly unioning each polygon to a result geometry. More...

#include <CascadedPolygonUnion.h>

List of all members.

Public Member Functions

 CascadedPolygonUnion (std::vector< geom::Polygon * > *polys)
geom::GeometryUnion ()

Static Public Member Functions

geom::GeometryUnion (std::vector< geom::Polygon * > *polys)
template<class T>
geom::GeometryUnion (T start, T end)
geom::GeometryUnion (const geom::MultiPolygon *polys)


Detailed Description

Provides an efficient method of unioning a collection of Polygonal geometries. This algorithm is faster and likely more robust than the simple iterated approach of repeatedly unioning each polygon to a result geometry.

The buffer(0) trick is sometimes faster, but can be less robust and can sometimes take an exceptionally long time to complete. This is particularly the case where there is a high degree of overlap between the polygons. In this case, buffer(0) is forced to compute with all line segments from the outset, whereas cascading can eliminate many segments at each stage of processing. The best case for buffer(0) is the trivial case where there is no overlap between the input geometries. However, this case is likely rare in practice.


Constructor & Destructor Documentation

geos::operation::geounion::CascadedPolygonUnion::CascadedPolygonUnion std::vector< geom::Polygon * > *  polys  )  [inline]
 

Creates a new instance to union the given collection of Geometrys.

Parameters:
geoms a collection of Polygonal Geometrys ownership of elements _and_ vector are left to caller.


Member Function Documentation

geom::Geometry* geos::operation::geounion::CascadedPolygonUnion::Union  ) 
 

Computes the union of the input geometries.

Returns:
the union of the input geometries

null if no input geometries were provided

geom::Geometry* geos::operation::geounion::CascadedPolygonUnion::Union const geom::MultiPolygon polys  )  [static]
 

Computes the union of a collection of Polygonal Geometrys.

Parameters:
polys a collection of Polygonal Geometrys ownership of elements _and_ vector are left to caller.

template<class T>
geom::Geometry* geos::operation::geounion::CascadedPolygonUnion::Union start,
end
[inline, static]
 

Computes the union of a set of Polygonal Geometrys.

T an iterator yelding something castable to const Polygon *

Parameters:
start start iterator
end end iterator

geom::Geometry* geos::operation::geounion::CascadedPolygonUnion::Union std::vector< geom::Polygon * > *  polys  )  [static]
 

Computes the union of a collection of Polygonal Geometrys.

Parameters:
polys a collection of Polygonal Geometrys. ownership of elements _and_ vector are left to caller.


The documentation for this class was generated from the following file:
Generated on Tue Jun 5 11:39:13 2012 for GEOS by  doxygen 1.3.9.1