Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75115 - trunk/boost/geometry/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-10-25 15:33:23


Author: barendgehrels
Date: 2011-10-25 15:33:22 EDT (Tue, 25 Oct 2011)
New Revision: 75115
URL: http://svn.boost.org/trac/boost/changeset/75115

Log:
Fixed order-problem by avoiding argument reversion. See correspondence on GGL mailing list 2011/10/25
Text files modified:
   trunk/boost/geometry/algorithms/difference.hpp | 22 +++++++++++++++++-----
   trunk/boost/geometry/algorithms/sym_difference.hpp | 36 ++++++++++++++++++++++++++++++++----
   2 files changed, 49 insertions(+), 9 deletions(-)

Modified: trunk/boost/geometry/algorithms/difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/difference.hpp (original)
+++ trunk/boost/geometry/algorithms/difference.hpp 2011-10-25 15:33:22 EDT (Tue, 25 Oct 2011)
@@ -53,11 +53,23 @@
     concept::check<Geometry1 const>();
     concept::check<Geometry2 const>();
     concept::check<GeometryOut>();
-
- return detail::intersection::insert<GeometryOut, true, overlay_difference>(
- geometry1, geometry2,
- out,
- strategy);
+
+ return geometry::dispatch::intersection_insert
+ <
+ typename geometry::tag<Geometry1>::type,
+ typename geometry::tag<Geometry2>::type,
+ typename geometry::tag<GeometryOut>::type,
+ geometry::is_areal<Geometry1>::value,
+ geometry::is_areal<Geometry2>::value,
+ geometry::is_areal<GeometryOut>::value,
+ Geometry1, Geometry2,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
+ OutputIterator, GeometryOut,
+ overlay_difference,
+ Strategy
+ >::apply(geometry1, geometry2, out, strategy);
 }
 
 /*!

Modified: trunk/boost/geometry/algorithms/sym_difference.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/sym_difference.hpp (original)
+++ trunk/boost/geometry/algorithms/sym_difference.hpp 2011-10-25 15:33:22 EDT (Tue, 25 Oct 2011)
@@ -57,10 +57,38 @@
     concept::check<Geometry2 const>();
     concept::check<GeometryOut>();
 
- out = detail::intersection::insert<GeometryOut, true, overlay_difference>(
- geometry1, geometry2, out, strategy);
- out = detail::intersection::insert<GeometryOut, true, overlay_difference>(
- geometry2, geometry1, out, strategy);
+ out = geometry::dispatch::intersection_insert
+ <
+ typename geometry::tag<Geometry1>::type,
+ typename geometry::tag<Geometry2>::type,
+ typename geometry::tag<GeometryOut>::type,
+ geometry::is_areal<Geometry1>::value,
+ geometry::is_areal<Geometry2>::value,
+ geometry::is_areal<GeometryOut>::value,
+ Geometry1, Geometry2,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value, true>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
+ OutputIterator, GeometryOut,
+ overlay_difference,
+ Strategy
+ >::apply(geometry1, geometry2, out, strategy);
+ out = geometry::dispatch::intersection_insert
+ <
+ typename geometry::tag<Geometry2>::type,
+ typename geometry::tag<Geometry1>::type,
+ typename geometry::tag<GeometryOut>::type,
+ geometry::is_areal<Geometry2>::value,
+ geometry::is_areal<Geometry1>::value,
+ geometry::is_areal<GeometryOut>::value,
+ Geometry2, Geometry1,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry2>::value>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<Geometry1>::value, true>::value,
+ geometry::detail::overlay::do_reverse<geometry::point_order<GeometryOut>::value>::value,
+ OutputIterator, GeometryOut,
+ overlay_difference,
+ Strategy
+ >::apply(geometry2, geometry1, out, strategy);
     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