Property Merge 45

The following is the declaration of the property merge algorithm.

template <typename coordinate_type, typename property_type>
class property_merge_45;

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_45_set_data<coordinate_type> >
std::map<std::vector<property_type>, polygon_45_set_data<coordinate_type> >

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

Member Functions

property_merge_45() Default constructor.
property_merge_45(const property_merge_45& that) Copy construct.
void
insert(const polygon_45_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 45 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.  O(n log n) 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 http://www.boost.org/LICENSE_1_0.txt)