Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r60641 - in sandbox/geometry/boost/geometry: algorithms multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2010-03-16 07:01:49


Author: barendgehrels
Date: 2010-03-16 07:01:49 EDT (Tue, 16 Mar 2010)
New Revision: 60641
URL: http://svn.boost.org/trac/boost/changeset/60641

Log:
Removed accidental tabs
Text files modified:
   sandbox/geometry/boost/geometry/algorithms/dissolve.hpp | 110 ++++++++++++++++++++--------------------
   sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp | 86 +++++++++++++++---------------
   2 files changed, 98 insertions(+), 98 deletions(-)

Modified: sandbox/geometry/boost/geometry/algorithms/dissolve.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/algorithms/dissolve.hpp (original)
+++ sandbox/geometry/boost/geometry/algorithms/dissolve.hpp 2010-03-16 07:01:49 EDT (Tue, 16 Mar 2010)
@@ -40,7 +40,7 @@
 template <typename Geometry, typename GeometryOut>
 struct dissolve_ring_or_polygon
 {
- template <typename OutputIterator>
+ template <typename OutputIterator>
     static inline OutputIterator apply(Geometry const& geometry,
                 OutputIterator out)
     {
@@ -57,43 +57,43 @@
                 detail::overlay::calculate_distance_policy
>(geometry, turns, policy);
 
- // The dissolve process is not necessary if there are no turns at all
+ // The dissolve process is not necessary if there are no turns at all
 
- if (boost::size(turns) > 0)
- {
- typedef typename ring_type<Geometry>::type ring_type;
- typedef std::vector<ring_type> out_vector;
- out_vector rings;
-
- // Enrich the turns
- typedef typename strategy_side
- <
- typename cs_tag<Geometry>::type
- >::type side_strategy_type;
-
- enrich_intersection_points(turns, geometry, geometry,
- side_strategy_type());
-
-
- // Traverse the polygons twice in two different directions
- traverse(geometry, geometry, detail::overlay::operation_union,
- turns, rings);
-
- clear_visit_info(turns);
-
- traverse(geometry, geometry, detail::overlay::operation_intersection,
- turns, rings);
-
- return detail::overlay::assemble<GeometryOut>(rings, turns,
- geometry, geometry, 1, true, out);
- }
- else
- {
- GeometryOut g;
- geometry::convert(geometry, g);
- *out++ = g;
- return out;
- }
+ if (boost::size(turns) > 0)
+ {
+ typedef typename ring_type<Geometry>::type ring_type;
+ typedef std::vector<ring_type> out_vector;
+ out_vector rings;
+
+ // Enrich the turns
+ typedef typename strategy_side
+ <
+ typename cs_tag<Geometry>::type
+ >::type side_strategy_type;
+
+ enrich_intersection_points(turns, geometry, geometry,
+ side_strategy_type());
+
+
+ // Traverse the polygons twice in two different directions
+ traverse(geometry, geometry, detail::overlay::operation_union,
+ turns, rings);
+
+ clear_visit_info(turns);
+
+ traverse(geometry, geometry, detail::overlay::operation_intersection,
+ turns, rings);
+
+ return detail::overlay::assemble<GeometryOut>(rings, turns,
+ geometry, geometry, 1, true, out);
+ }
+ else
+ {
+ GeometryOut g;
+ geometry::convert(geometry, g);
+ *out++ = g;
+ return out;
+ }
     }
 };
 
@@ -109,10 +109,10 @@
 
 template
 <
- typename GeometryTag,
- typename GeometryOutTag,
- typename Geometry,
- typename GeometryOut
+ typename GeometryTag,
+ typename GeometryOutTag,
+ typename Geometry,
+ typename GeometryOut
>
 struct dissolve
 {};
@@ -158,9 +158,9 @@
     return dispatch::dissolve
     <
         typename tag<Geometry>::type,
- typename tag<GeometryOut>::type,
+ typename tag<GeometryOut>::type,
         Geometry,
- GeometryOut
+ GeometryOut
>::apply(geometry, out);
 }
 
@@ -175,22 +175,22 @@
     concept::check<Geometry const>();
     concept::check<GeometryOut>();
 
- std::vector<GeometryOut> v;
+ std::vector<GeometryOut> v;
     dispatch::dissolve
     <
         typename tag<Geometry>::type,
- typename tag<GeometryOut>::type,
+ typename tag<GeometryOut>::type,
         Geometry,
- GeometryOut
- >::apply(geometry, std::back_inserter(v));
- if (boost::size(v) > 0)
- {
- out = v.front();
- }
- else
- {
- out = geometry;
- }
+ GeometryOut
+ >::apply(geometry, std::back_inserter(v));
+ if (boost::size(v) > 0)
+ {
+ out = v.front();
+ }
+ else
+ {
+ out = geometry;
+ }
 }
 
 

Modified: sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp
==============================================================================
--- sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp (original)
+++ sandbox/geometry/boost/geometry/multi/algorithms/dissolve.hpp 2010-03-16 07:01:49 EDT (Tue, 16 Mar 2010)
@@ -24,59 +24,59 @@
 template <typename Multi, typename MultiOut>
 struct dissolve_multi
 {
- template <typename OutputIterator>
+ template <typename OutputIterator>
     static inline OutputIterator apply(Multi const& multi, OutputIterator out)
     {
- typedef typename boost::range_value<Multi>::type polygon_type;
- typedef typename boost::range_value<MultiOut>::type output_polygon_type;
- typedef typename boost::range_iterator<Multi const>::type iterator_type;
-
- // Step 1: dissolve all polygons in the multi-polygon, independantly
- MultiOut step1;
+ typedef typename boost::range_value<Multi>::type polygon_type;
+ typedef typename boost::range_value<MultiOut>::type output_polygon_type;
+ typedef typename boost::range_iterator<Multi const>::type iterator_type;
+
+ // Step 1: dissolve all polygons in the multi-polygon, independantly
+ MultiOut step1;
         for (iterator_type it = boost::begin(multi);
             it != boost::end(multi);
             ++it)
         {
- dissolve_ring_or_polygon
- <
- polygon_type,
- output_polygon_type
- >::apply(*it, std::back_inserter(step1));
- }
-
- // Step 2: remove mutual overlap
- // TODO: solve quadratic behaviour by alternating division in x/y axis
- // per division there are 3 cases: cases above the line, cases below the line, cases crossing the line
- // recursively handle those 3 cases and union them.
- MultiOut step2;
+ dissolve_ring_or_polygon
+ <
+ polygon_type,
+ output_polygon_type
+ >::apply(*it, std::back_inserter(step1));
+ }
+
+ // Step 2: remove mutual overlap
+ // TODO: solve quadratic behaviour by alternating division in x/y axis
+ // per division there are 3 cases: cases above the line, cases below the line, cases crossing the line
+ // recursively handle those 3 cases and union them.
+ MultiOut step2;
         for (iterator_type it = boost::begin(step1);
             it != boost::end(step1);
             ++it)
         {
- if (step2.empty())
- {
- step2.push_back(*it);
- }
- else
- {
- MultiOut unioned;
- for (iterator_type it2 = boost::begin(step2);
- it2 != boost::end(step2);
- ++it2)
- {
- geometry::union_inserter
- <
- output_polygon_type
- >(*it2, *it, std::back_inserter(unioned));
- }
- step2.swap(unioned);
- }
- }
-
- // Step 3: output
- *out++ = step2;
- return out;
- }
+ if (step2.empty())
+ {
+ step2.push_back(*it);
+ }
+ else
+ {
+ MultiOut unioned;
+ for (iterator_type it2 = boost::begin(step2);
+ it2 != boost::end(step2);
+ ++it2)
+ {
+ geometry::union_inserter
+ <
+ output_polygon_type
+ >(*it2, *it, std::back_inserter(unioned));
+ }
+ step2.swap(unioned);
+ }
+ }
+
+ // Step 3: output
+ *out++ = step2;
+ return out;
+ }
 };
 
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk