Property Merge

The following is the declaration of the property merge algorithm.

template <typename coordinate_type, typename property_type>
class property_merge;

The property algorithm computes the n-layer map overlay of input polygon sets.  Each input geometry is inserted along with a property value.  The property type can be anything suitable for use as an element of a std::set.  Multiple geometry objects can be separately inserted with the same property value.  To store the result of this operation a fairly complex container is required.  Resulting geometries are associated with unique subsets of property values of the input geometry.  Two suitable containers for storing the result of a property merge operation are:

std::map<std::set<property_type>, polygon_set_data<coordinate_type> >
std::map<std::vector<property_type>, polygon_set_data<coordinate_type> >

Example code property_merge_usage.cpp demonstrates using the n-layer map-overlay algorithm on polygon data.

Member Functions

property_merge() Default constructor.
property_merge(const property_merge& that) Copy construct.
insert(const polygon_set_data<coordinate_type>& ps,
       const property_type& property)
Insert a polygon set with an associated property.  Linear wrt vertices inserted.
template <class GeoObjT>
void insert(const GeoObjT& geoObj,
       const property_type& property)
Insert a geometry object that is a refinement of polygon set with an associated property.  Linear wrt vertices inserted.
template <typename result_type>
void merge(result_type& result)
Accepts a container object that conforms to the expectations defined above.  Performs property merge and populates the container object.  Expected n log n runtime, worst case quadratic runtime wrt. vertices + intersections.
Copyright: Copyright Intel Corporation 2008-2010.
License: Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at