summaryrefslogtreecommitdiff
path: root/boost/geometry/index
diff options
context:
space:
mode:
Diffstat (limited to 'boost/geometry/index')
-rw-r--r--boost/geometry/index/detail/algorithms/intersection_content.hpp21
-rw-r--r--boost/geometry/index/detail/algorithms/path_intersection.hpp6
-rw-r--r--boost/geometry/index/detail/rtree/node/variant_dynamic.hpp4
-rw-r--r--boost/geometry/index/detail/rtree/node/weak_dynamic.hpp2
-rw-r--r--boost/geometry/index/detail/rtree/visitors/remove.hpp4
-rw-r--r--boost/geometry/index/equal_to.hpp2
-rw-r--r--boost/geometry/index/indexable.hpp3
-rw-r--r--boost/geometry/index/rtree.hpp24
8 files changed, 39 insertions, 27 deletions
diff --git a/boost/geometry/index/detail/algorithms/intersection_content.hpp b/boost/geometry/index/detail/algorithms/intersection_content.hpp
index 04dd4728be..437f90b46c 100644
--- a/boost/geometry/index/detail/algorithms/intersection_content.hpp
+++ b/boost/geometry/index/detail/algorithms/intersection_content.hpp
@@ -2,7 +2,7 @@
//
// boxes union/intersection area/volume
//
-// Copyright (c) 2011-2016 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,8 +11,9 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_INTERSECTION_CONTENT_HPP
-#include <boost/geometry/algorithms/intersection.hpp>
-#include <boost/geometry/strategies/intersection_strategies.hpp>
+#include <boost/geometry/algorithms/detail/disjoint/box_box.hpp>
+#include <boost/geometry/algorithms/detail/overlay/intersection_box_box.hpp>
+
#include <boost/geometry/index/detail/algorithms/content.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
@@ -23,11 +24,19 @@ namespace boost { namespace geometry { namespace index { namespace detail {
template <typename Box>
inline typename default_content_result<Box>::type intersection_content(Box const& box1, Box const& box2)
{
- if ( geometry::intersects(box1, box2) )
+ bool const intersects = ! geometry::detail::disjoint::box_box<Box, Box>::apply(box1, box2);
+
+ if ( intersects )
{
Box box_intersection;
- if ( geometry::intersection(box1, box2, box_intersection) )
- return detail::content(box_intersection);
+ bool const ok = geometry::detail::intersection::intersection_box_box
+ <
+ 0, geometry::dimension<Box>::value
+ >::apply(box1, box2, 0, box_intersection, 0);
+ if ( ok )
+ {
+ return index::detail::content(box_intersection);
+ }
}
return 0;
}
diff --git a/boost/geometry/index/detail/algorithms/path_intersection.hpp b/boost/geometry/index/detail/algorithms/path_intersection.hpp
index fe92596ba2..3cfb556c30 100644
--- a/boost/geometry/index/detail/algorithms/path_intersection.hpp
+++ b/boost/geometry/index/detail/algorithms/path_intersection.hpp
@@ -2,7 +2,7 @@
//
// n-dimensional box-linestring intersection
//
-// Copyright (c) 2011-2014 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -11,8 +11,12 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_ALGORITHMS_PATH_INTERSECTION_HPP
+
#include <boost/geometry/index/detail/algorithms/segment_intersection.hpp>
+#include <boost/geometry/strategies/default_length_result.hpp>
+
+
namespace boost { namespace geometry { namespace index { namespace detail {
namespace dispatch {
diff --git a/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp b/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
index 8e052e5216..e63cfd39ac 100644
--- a/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
+++ b/boost/geometry/index/detail/rtree/node/variant_dynamic.hpp
@@ -11,6 +11,8 @@
#ifndef BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
#define BOOST_GEOMETRY_INDEX_DETAIL_RTREE_NODE_VARIANT_DYNAMIC_HPP
+#include <boost/core/pointer_traits.hpp>
+
namespace boost { namespace geometry { namespace index {
namespace detail { namespace rtree {
@@ -183,7 +185,7 @@ struct create_variant_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
- Al::construct(alloc_node, boost::addressof(*p), Node(alloc_node)); // implicit cast to Variant
+ Al::construct(alloc_node, boost::pointer_traits<P>::to_address(p), Node(alloc_node)); // implicit cast to Variant
deallocator.release();
return p;
diff --git a/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp b/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
index d49e347826..05fef59e52 100644
--- a/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
+++ b/boost/geometry/index/detail/rtree/node/weak_dynamic.hpp
@@ -199,7 +199,7 @@ struct create_weak_node
scoped_deallocator<AllocNode> deallocator(p, alloc_node);
- Al::construct(alloc_node, boost::addressof(*p), alloc_node);
+ Al::construct(alloc_node, boost::pointer_traits<P>::to_address(p), alloc_node);
deallocator.release();
return p;
diff --git a/boost/geometry/index/detail/rtree/visitors/remove.hpp b/boost/geometry/index/detail/rtree/visitors/remove.hpp
index 6326f87db6..7e6162a616 100644
--- a/boost/geometry/index/detail/rtree/visitors/remove.hpp
+++ b/boost/geometry/index/detail/rtree/visitors/remove.hpp
@@ -2,7 +2,7 @@
//
// R-tree removing visitor implementation
//
-// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -13,7 +13,7 @@
#include <boost/geometry/index/detail/rtree/visitors/is_leaf.hpp>
-#include <boost/geometry/algorithms/covered_by.hpp>
+#include <boost/geometry/algorithms/detail/covered_by/interface.hpp>
namespace boost { namespace geometry { namespace index {
diff --git a/boost/geometry/index/equal_to.hpp b/boost/geometry/index/equal_to.hpp
index 6b722a89fc..2fb1ed216c 100644
--- a/boost/geometry/index/equal_to.hpp
+++ b/boost/geometry/index/equal_to.hpp
@@ -9,7 +9,7 @@
#ifndef BOOST_GEOMETRY_INDEX_EQUAL_TO_HPP
#define BOOST_GEOMETRY_INDEX_EQUAL_TO_HPP
-#include <boost/geometry/algorithms/equals.hpp>
+#include <boost/geometry/algorithms/detail/equals/interface.hpp>
#include <boost/geometry/index/indexable.hpp>
namespace boost { namespace geometry { namespace index { namespace detail {
diff --git a/boost/geometry/index/indexable.hpp b/boost/geometry/index/indexable.hpp
index feaae557af..831e17f6dd 100644
--- a/boost/geometry/index/indexable.hpp
+++ b/boost/geometry/index/indexable.hpp
@@ -1,6 +1,6 @@
// Boost.Geometry Index
//
-// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -10,6 +10,7 @@
#define BOOST_GEOMETRY_INDEX_INDEXABLE_HPP
#include <boost/mpl/assert.hpp>
+#include <boost/tuple/tuple.hpp>
#include <boost/geometry/index/detail/is_indexable.hpp>
diff --git a/boost/geometry/index/rtree.hpp b/boost/geometry/index/rtree.hpp
index 6d3704ff8c..439880ad5a 100644
--- a/boost/geometry/index/rtree.hpp
+++ b/boost/geometry/index/rtree.hpp
@@ -3,7 +3,7 @@
// R-tree implementation
//
// Copyright (c) 2008 Federico J. Fernandez.
-// Copyright (c) 2011-2015 Adam Wulkiewicz, Lodz, Poland.
+// Copyright (c) 2011-2017 Adam Wulkiewicz, Lodz, Poland.
//
// Use, modification and distribution is subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
@@ -21,20 +21,18 @@
// Boost.Geometry
#include <boost/geometry/algorithms/detail/comparable_distance/interface.hpp>
+#include <boost/geometry/algorithms/detail/covered_by/interface.hpp>
+#include <boost/geometry/algorithms/detail/disjoint/interface.hpp>
+#include <boost/geometry/algorithms/detail/equals/interface.hpp>
+#include <boost/geometry/algorithms/detail/intersects/interface.hpp>
+#include <boost/geometry/algorithms/detail/overlaps/interface.hpp>
+#include <boost/geometry/algorithms/detail/touches/interface.hpp>
+#include <boost/geometry/algorithms/detail/within/interface.hpp>
#include <boost/geometry/algorithms/centroid.hpp>
-#include <boost/geometry/algorithms/covered_by.hpp>
-#include <boost/geometry/algorithms/disjoint.hpp>
-#include <boost/geometry/algorithms/equals.hpp>
-#include <boost/geometry/algorithms/intersects.hpp>
-#include <boost/geometry/algorithms/overlaps.hpp>
-#include <boost/geometry/algorithms/touches.hpp>
-#include <boost/geometry/algorithms/within.hpp>
#include <boost/geometry/geometries/point.hpp>
#include <boost/geometry/geometries/box.hpp>
-#include <boost/geometry/strategies/strategies.hpp>
-
// Boost.Geometry.Index
#include <boost/geometry/index/detail/config_begin.hpp>
@@ -145,7 +143,8 @@ compared left-to-right.
\tparam Allocator The allocator used to allocate/deallocate memory,
construct/destroy nodes and Values.
*/
-template <
+template
+<
typename Value,
typename Parameters,
typename IndexableGetter = index::indexable<Value>,
@@ -2222,9 +2221,6 @@ struct range_mutable_iterator
} // namespace boost
-// TODO: don't include the implementation at the end of the file
-#include <boost/geometry/algorithms/detail/comparable_distance/implementation.hpp>
-
#include <boost/geometry/index/detail/config_end.hpp>
#endif // BOOST_GEOMETRY_INDEX_RTREE_HPP