|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r69587 - in trunk/boost/geometry: algorithms/detail/overlay multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-03-05 18:27:07
Author: barendgehrels
Date: 2011-03-05 18:27:06 EST (Sat, 05 Mar 2011)
New Revision: 69587
URL: http://svn.boost.org/trac/boost/changeset/69587
Log:
Fixed error in new assemble approach, now both recursive_boxes as intersection_pies are completely running (again) for all combinations of open,cw,ccw,multi,box,triangle
Text files modified:
trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp | 18 +++++-------------
trunk/boost/geometry/multi/algorithms/intersection.hpp | 3 ++-
2 files changed, 7 insertions(+), 14 deletions(-)
Modified: trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp
==============================================================================
--- trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp (original)
+++ trunk/boost/geometry/algorithms/detail/overlay/assign_parents.hpp 2011-03-05 18:27:06 EST (Sat, 05 Mar 2011)
@@ -30,7 +30,7 @@
typename Geometry1, typename Geometry2,
typename RingCollection
>
-static inline bool contains(ring_identifier ring_id, Item const& item1, Item const& item2,
+static inline bool within_selected_input(Item const& item2, ring_identifier ring_id,
Geometry1 const& geometry1, Geometry2 const& geometry2,
RingCollection const& collection)
{
@@ -49,19 +49,11 @@
get_ring<tag2>::apply(ring_id, geometry2));
break;
case 2 :
- // Within if it is within one of the collection
- for (BOOST_AUTO(it, boost::begin(collection)); it != boost::end(collection); ++it)
- {
- int subcode = point_in_ring(item2.point,
- get_ring<ring_tag>::apply(ring_id, *it));
- if (subcode > code)
- {
- code = subcode;
- }
- }
+ code = point_in_ring(item2.point,
+ get_ring<void>::apply(ring_id, collection));
break;
}
- return code == 0 ? item1.get_area() < 0 : code == 1;
+ return code == 1;
}
@@ -152,7 +144,7 @@
if ( (inner.get_area() < 0 || check_for_orientation)
&& geometry::within(inner.point, out_it->envelope)
- && contains(out_it->id, outer, inner, geometry1, geometry2, collection))
+ && within_selected_input(inner, out_it->id, geometry1, geometry2, collection))
{
inner.parent = out_it->id;
}
Modified: trunk/boost/geometry/multi/algorithms/intersection.hpp
==============================================================================
--- trunk/boost/geometry/multi/algorithms/intersection.hpp (original)
+++ trunk/boost/geometry/multi/algorithms/intersection.hpp 2011-03-05 18:27:06 EST (Sat, 05 Mar 2011)
@@ -9,7 +9,6 @@
#define BOOST_GEOMETRY_MULTI_ALGORITHMS_INTERSECTION_HPP
-#include <boost/geometry/algorithms/intersection.hpp>
#include <boost/geometry/multi/core/closure.hpp>
#include <boost/geometry/multi/core/geometry_id.hpp>
#include <boost/geometry/multi/core/is_areal.hpp>
@@ -24,6 +23,8 @@
#include <boost/geometry/multi/algorithms/detail/sections/range_by_section.hpp>
#include <boost/geometry/multi/algorithms/detail/sections/sectionalize.hpp>
+#include <boost/geometry/algorithms/intersection.hpp>
+
namespace boost { namespace geometry
{
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