Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82617 - in sandbox-branches/geometry/index: boost/geometry/index boost/geometry/index/detail doc/generated doc/html doc/html/geometry_index doc/html/geometry_index/r_tree tests
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-25 19:36:31


Author: awulkiew
Date: 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
New Revision: 82617
URL: http://svn.boost.org/trac/boost/changeset/82617

Log:
nearest() predicate and related classes moved from distance_predicates.hpp to predicates.hpp
query() methods and functions documented.
nearest() predicate documented.
Changes in various methods/functions description.
Deleted unneeded query_expr.
Removed:
   sandbox-branches/geometry/index/boost/geometry/index/query_expr.hpp
   sandbox-branches/geometry/index/tests/query_expr.cpp
Text files modified:
   sandbox-branches/geometry/index/boost/geometry/index/detail/distance_predicates.hpp | 188 --
   sandbox-branches/geometry/index/boost/geometry/index/detail/predicates.hpp | 188 ++
   sandbox-branches/geometry/index/boost/geometry/index/distance_predicates.hpp | 34
   sandbox-branches/geometry/index/boost/geometry/index/predicates.hpp | 101 +
   sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp | 268 ++++
   sandbox-branches/geometry/index/doc/generated/adaptors.qbk | 18
   sandbox-branches/geometry/index/doc/generated/distance_predicates.qbk | 24
   sandbox-branches/geometry/index/doc/generated/predicates.qbk | 115 +
   sandbox-branches/geometry/index/doc/generated/rtree.qbk | 157 ++
   sandbox-branches/geometry/index/doc/generated/rtree_functions.qbk | 170 ++
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html | 4
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html | 2574 +++++++++++++++++++++++++++++++--------
   sandbox-branches/geometry/index/doc/html/index.html | 2
   13 files changed, 3035 insertions(+), 808 deletions(-)

Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/distance_predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/distance_predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/distance_predicates.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -29,194 +29,6 @@
 namespace boost { namespace geometry { namespace index { namespace detail {
 
 // ------------------------------------------------------------------ //
-// predicate
-// ------------------------------------------------------------------ //
-
-template <typename DistancePredicates>
-struct nearest
-{
- static const bool is_one = false;
-
- nearest(DistancePredicates const& dpred, unsigned k)
- : distance_predicates(dpred)
- , count(k)
- {}
- DistancePredicates const& distance_predicates;
- unsigned count;
-};
-
-template <typename DistancePredicates>
-struct predicate_check<nearest<DistancePredicates>, value_tag>
-{
- template <typename Value, typename Box>
- static inline bool apply(nearest<DistancePredicates> const&, Value const&, Box const&)
- {
- return true;
- }
-};
-
-template <typename DistancePredicates>
-struct predicate_check<nearest<DistancePredicates>, envelope_tag>
-{
- template <typename Value, typename Box>
- static inline bool apply(nearest<DistancePredicates> const&, Value const&, Box const&)
- {
- return true;
- }
-};
-
-template <typename DistancePredicates>
-struct nearest_one
-{
- static const bool is_one = true;
-
- nearest_one(DistancePredicates const& dpred)
- : distance_predicates(dpred)
- {}
- DistancePredicates const& distance_predicates;
-};
-
-template <typename DistancePredicates>
-struct predicate_check<nearest_one<DistancePredicates>, value_tag>
-{
- template <typename Value, typename Box>
- static inline bool apply(nearest_one<DistancePredicates> const&, Value const&, Box const&)
- {
- return true;
- }
-};
-
-template <typename DistancePredicates>
-struct predicate_check<nearest_one<DistancePredicates>, envelope_tag>
-{
- template <typename Value, typename Box>
- static inline bool apply(nearest_one<DistancePredicates> const&, Value const&, Box const&)
- {
- return true;
- }
-};
-
-// predicates_is_nearest
-
-template <typename P>
-struct predicates_is_nearest
-{
- static const unsigned value = 0;
-};
-
-template <typename DistancePredicates>
-struct predicates_is_nearest< nearest<DistancePredicates> >
-{
- static const unsigned value = 1;
-};
-
-template <typename DistancePredicates>
-struct predicates_is_nearest< nearest_one<DistancePredicates> >
-{
- static const unsigned value = 1;
-};
-
-// predicates_count_nearest
-
-template <typename T>
-struct predicates_count_nearest
-{
- static const unsigned value = predicates_is_nearest<T>::value;
-};
-
-template <typename F, typename S>
-struct predicates_count_nearest< std::pair<F, S> >
-{
- static const unsigned value = predicates_is_nearest<F>::value
- + predicates_is_nearest<S>::value;
-};
-
-template <typename Tuple, unsigned N>
-struct predicates_count_nearest_tuple
-{
- static const unsigned value =
- predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value
- + predicates_count_nearest_tuple<Tuple, N-1>::value;
-};
-
-template <typename Tuple>
-struct predicates_count_nearest_tuple<Tuple, 1>
-{
- static const unsigned value =
- predicates_is_nearest<typename boost::tuples::element<0, Tuple>::type>::value;
-};
-
-template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-struct predicates_count_nearest< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
-{
- static const unsigned value = predicates_count_nearest_tuple<
- boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
- boost::tuples::length< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value
- >::value;
-};
-
-template <typename Head, typename Tail>
-struct predicates_count_nearest< boost::tuples::cons<Head, Tail> >
-{
- static const unsigned value = predicates_count_nearest_tuple<
- boost::tuples::cons<Head, Tail>,
- boost::tuples::length< boost::tuples::cons<Head, Tail> >::value
- >::value;
-};
-
-// predicates_find_nearest
-
-template <typename T>
-struct predicates_find_nearest
-{
- static const unsigned value = predicates_is_nearest<T>::value ? 0 : 1;
-};
-
-template <typename F, typename S>
-struct predicates_find_nearest< std::pair<F, S> >
-{
- static const unsigned value = predicates_is_nearest<F>::value ? 0 :
- (predicates_is_nearest<S>::value ? 1 : 2);
-};
-
-template <typename Tuple, unsigned N>
-struct predicates_find_nearest_tuple
-{
- static const bool is_found = predicates_find_nearest_tuple<Tuple, N-1>::is_found
- || predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value;
-
- static const unsigned value = predicates_find_nearest_tuple<Tuple, N-1>::is_found ?
- predicates_find_nearest_tuple<Tuple, N-1>::value :
- (predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value ?
- N-1 : boost::tuples::length<Tuple>::value);
-};
-
-template <typename Tuple>
-struct predicates_find_nearest_tuple<Tuple, 1>
-{
- static const bool is_found = predicates_is_nearest<typename boost::tuples::element<0, Tuple>::type>::value;
- static const unsigned value = is_found ? 0 : boost::tuples::length<Tuple>::value;
-};
-
-template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
-struct predicates_find_nearest< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
-{
- static const unsigned value = predicates_find_nearest_tuple<
- boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
- boost::tuples::length< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value
- >::value;
-};
-
-template <typename Head, typename Tail>
-struct predicates_find_nearest< boost::tuples::cons<Head, Tail> >
-{
- static const unsigned value = predicates_find_nearest_tuple<
- boost::tuples::cons<Head, Tail>,
- boost::tuples::length< boost::tuples::cons<Head, Tail> >::value
- >::value;
-};
-
-// ------------------------------------------------------------------ //
 // relations
 // ------------------------------------------------------------------ //
 

Modified: sandbox-branches/geometry/index/boost/geometry/index/detail/predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/detail/predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/detail/predicates.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -113,6 +113,30 @@
     Geometry geometry;
 };
 
+template <typename DistancePredicates>
+struct nearest
+{
+ static const bool is_one = false;
+
+ nearest(DistancePredicates const& dpred, unsigned k)
+ : distance_predicates(dpred)
+ , count(k)
+ {}
+ DistancePredicates const& distance_predicates;
+ unsigned count;
+};
+
+template <typename DistancePredicates>
+struct nearest_one
+{
+ static const bool is_one = true;
+
+ nearest_one(DistancePredicates const& dpred)
+ : distance_predicates(dpred)
+ {}
+ DistancePredicates const& distance_predicates;
+};
+
 // ------------------------------------------------------------------ //
 // predicate_check
 // ------------------------------------------------------------------ //
@@ -280,6 +304,26 @@
     }
 };
 
+template <typename DistancePredicates>
+struct predicate_check<nearest<DistancePredicates>, value_tag>
+{
+ template <typename Value, typename Box>
+ static inline bool apply(nearest<DistancePredicates> const&, Value const&, Box const&)
+ {
+ return true;
+ }
+};
+
+template <typename DistancePredicates>
+struct predicate_check<nearest_one<DistancePredicates>, value_tag>
+{
+ template <typename Value, typename Box>
+ static inline bool apply(nearest_one<DistancePredicates> const&, Value const&, Box const&)
+ {
+ return true;
+ }
+};
+
 // ------------------------------------------------------------------ //
 // predicates_chec for envelope
 // ------------------------------------------------------------------ //
@@ -438,6 +482,26 @@
     }
 };
 
+template <typename DistancePredicates>
+struct predicate_check<nearest<DistancePredicates>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static inline bool apply(nearest<DistancePredicates> const&, Value const&, Box const&)
+ {
+ return true;
+ }
+};
+
+template <typename DistancePredicates>
+struct predicate_check<nearest_one<DistancePredicates>, envelope_tag>
+{
+ template <typename Value, typename Box>
+ static inline bool apply(nearest_one<DistancePredicates> const&, Value const&, Box const&)
+ {
+ return true;
+ }
+};
+
 // ------------------------------------------------------------------ //
 // predicates_length
 // ------------------------------------------------------------------ //
@@ -663,6 +727,130 @@
         ::apply(p, v, i);
 }
 
+// ------------------------------------------------------------------ //
+// nearest predicate helpers
+// ------------------------------------------------------------------ //
+
+// predicates_is_nearest
+
+template <typename P>
+struct predicates_is_nearest
+{
+ static const unsigned value = 0;
+};
+
+template <typename DistancePredicates>
+struct predicates_is_nearest< nearest<DistancePredicates> >
+{
+ static const unsigned value = 1;
+};
+
+template <typename DistancePredicates>
+struct predicates_is_nearest< nearest_one<DistancePredicates> >
+{
+ static const unsigned value = 1;
+};
+
+// predicates_count_nearest
+
+template <typename T>
+struct predicates_count_nearest
+{
+ static const unsigned value = predicates_is_nearest<T>::value;
+};
+
+template <typename F, typename S>
+struct predicates_count_nearest< std::pair<F, S> >
+{
+ static const unsigned value = predicates_is_nearest<F>::value
+ + predicates_is_nearest<S>::value;
+};
+
+template <typename Tuple, unsigned N>
+struct predicates_count_nearest_tuple
+{
+ static const unsigned value =
+ predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value
+ + predicates_count_nearest_tuple<Tuple, N-1>::value;
+};
+
+template <typename Tuple>
+struct predicates_count_nearest_tuple<Tuple, 1>
+{
+ static const unsigned value =
+ predicates_is_nearest<typename boost::tuples::element<0, Tuple>::type>::value;
+};
+
+template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+struct predicates_count_nearest< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+{
+ static const unsigned value = predicates_count_nearest_tuple<
+ boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
+ boost::tuples::length< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value
+ >::value;
+};
+
+template <typename Head, typename Tail>
+struct predicates_count_nearest< boost::tuples::cons<Head, Tail> >
+{
+ static const unsigned value = predicates_count_nearest_tuple<
+ boost::tuples::cons<Head, Tail>,
+ boost::tuples::length< boost::tuples::cons<Head, Tail> >::value
+ >::value;
+};
+
+// predicates_find_nearest
+
+template <typename T>
+struct predicates_find_nearest
+{
+ static const unsigned value = predicates_is_nearest<T>::value ? 0 : 1;
+};
+
+template <typename F, typename S>
+struct predicates_find_nearest< std::pair<F, S> >
+{
+ static const unsigned value = predicates_is_nearest<F>::value ? 0 :
+ (predicates_is_nearest<S>::value ? 1 : 2);
+};
+
+template <typename Tuple, unsigned N>
+struct predicates_find_nearest_tuple
+{
+ static const bool is_found = predicates_find_nearest_tuple<Tuple, N-1>::is_found
+ || predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value;
+
+ static const unsigned value = predicates_find_nearest_tuple<Tuple, N-1>::is_found ?
+ predicates_find_nearest_tuple<Tuple, N-1>::value :
+ (predicates_is_nearest<typename boost::tuples::element<N-1, Tuple>::type>::value ?
+ N-1 : boost::tuples::length<Tuple>::value);
+};
+
+template <typename Tuple>
+struct predicates_find_nearest_tuple<Tuple, 1>
+{
+ static const bool is_found = predicates_is_nearest<typename boost::tuples::element<0, Tuple>::type>::value;
+ static const unsigned value = is_found ? 0 : boost::tuples::length<Tuple>::value;
+};
+
+template <typename T0, typename T1, typename T2, typename T3, typename T4, typename T5, typename T6, typename T7, typename T8, typename T9>
+struct predicates_find_nearest< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >
+{
+ static const unsigned value = predicates_find_nearest_tuple<
+ boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>,
+ boost::tuples::length< boost::tuple<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> >::value
+ >::value;
+};
+
+template <typename Head, typename Tail>
+struct predicates_find_nearest< boost::tuples::cons<Head, Tail> >
+{
+ static const unsigned value = predicates_find_nearest_tuple<
+ boost::tuples::cons<Head, Tail>,
+ boost::tuples::length< boost::tuples::cons<Head, Tail> >::value
+ >::value;
+};
+
 }}}} // namespace boost::geometry::index::detail
 
 #endif // BOOST_GEOMETRY_INDEX_DETAIL_PREDICATES_HPP

Modified: sandbox-branches/geometry/index/boost/geometry/index/distance_predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/distance_predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/distance_predicates.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -19,26 +19,10 @@
 
 namespace boost { namespace geometry { namespace index {
 
-// nearest predicate generators
-
-template <typename DistancePredicates> inline
-detail::nearest<DistancePredicates>
-nearest(DistancePredicates const& dpred, unsigned k)
-{
- return detail::nearest<DistancePredicates>(dpred, k);
-}
-
-template <typename DistancePredicates> inline
-detail::nearest_one<DistancePredicates>
-nearest(DistancePredicates const& dpred)
-{
- return detail::nearest_one<DistancePredicates>(dpred);
-}
-
 // relations generators
 
 /*!
-\brief Generate to_nearest() Point-Indexable relationship.
+\brief Generate to_nearest() relationship.
 
 Generate a nearest query Point and Value's Indexable relationship while calculating
 distances. This function may be used to define that knn query should calculate distances
@@ -49,10 +33,10 @@
 
 \ingroup distance_predicates
 
-\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
+\tparam T Type of wrapped object. This may be a Point for PointRelation or CoordinateType for
             MinRelation or MaxRelation
 
-\param v Point or bound value.
+\param v Point or distance value.
 */
 template <typename T>
 detail::to_nearest<T> to_nearest(T const& v)
@@ -61,7 +45,7 @@
 }
 
 /*!
-\brief Generate to_centroid() Point-Indexable relationship.
+\brief Generate to_centroid() relationship.
 
 Generate a nearest query Point and Value's Indexable relationship while calculating
 distances. This function may be used to define that knn query should calculate distances
@@ -71,10 +55,10 @@
 
 \ingroup distance_predicates
 
-\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
+\tparam T Type of wrapped object. This may be a Point for PointRelation or some CoordinateType for
             MinRelation or MaxRelation
 
-\param v Point or bound value.
+\param v Point or distance value.
 */
 template <typename T>
 detail::to_centroid<T> to_centroid(T const& v)
@@ -83,7 +67,7 @@
 }
 
 /*!
-\brief Generate to_furthest() Point-Indexable relationship.
+\brief Generate to_furthest() relationship.
 
 Generate a nearest query Point and Value's Indexable relationship while calculating
 distances. This function may be used to define that knn query should calculate distances
@@ -94,10 +78,10 @@
 
 \ingroup distance_predicates
 
-\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
+\tparam T Type of wrapped object. This may be a Point for PointRelation or some CoordinateType for
             MinRelation or MaxRelation
 
-\param v Point or bound value.
+\param v Point or distance value.
 */
 template <typename T>
 detail::to_furthest<T> to_furthest(T const& v)

Modified: sandbox-branches/geometry/index/boost/geometry/index/predicates.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/predicates.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/predicates.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -22,7 +22,7 @@
 #include <boost/geometry/index/detail/tuples.hpp>
 
 /*!
-\defgroup predicates Spatial predicates (boost::geometry::index::)
+\defgroup predicates Predicates (boost::geometry::index::)
 */
 
 namespace boost { namespace geometry { namespace index {
@@ -159,6 +159,105 @@
     return detail::value<Fun>(fun);
 }
 
+/*!
+\brief Generate nearest predicate.
+
+When nearest predicate is passed to the query, k-nearest neighbour search will be performed.
+
+<b>Distances predicates</b> may be a \c Point. In this the case values closest to \c Point are returned.
+
+It is possible to define how distance between values and query Point is calculated. This is done by passing PointRelation.
+It can be generated by following functions:
+\li \c boost::geometry::index::to_nearest() - default,
+\li \c boost::geometry::index::to_centroid(),
+\li \c boost::geometry::index::to_furthest().
+
+It is possible to define distances bounds, for example that a distance must be between
+min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+by following functions:
+\li \c boost::geometry::index::unbounded() - default,
+\li \c boost::geometry::index::min_bounded(),
+\li \c boost::geometry::index::max_bounded(),
+\li \c boost::geometry::index::bounded().
+
+MinRelation and MaxRelation describes bounds and can be generated by following functions:
+\li \c boost::geometry::index::to_nearest(),
+\li \c boost::geometry::index::to_centroid(),
+\li \c boost::geometry::index::to_furthest().
+
+\par Example
+\verbatim
+tree.query(bgi::nearest(pt, 5), std::back_inserter(result));
+tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+tree.query(bgi::nearest(bgi::to_centroid(pt), 5) && bgi::within(box), std::back_inserter(result));
+tree.query(bgi::nearest(bgi::bounded(pt, bgi::to_furthest(10), bgi::to_nearest(20)), 5), std::back_inserter(result));
+\endverbatim
+
+\warning
+Only one \c nearest() predicate may be used in a query.
+This version may be used only in queries returning a set of values - using output iterator.
+
+\ingroup predicates
+
+\param dpred The distance predicates.
+\param k The maximum number of values to return.
+*/
+template <typename DistancePredicates> inline
+detail::nearest<DistancePredicates>
+nearest(DistancePredicates const& dpred, unsigned k)
+{
+ return detail::nearest<DistancePredicates>(dpred, k);
+}
+
+/*!
+\brief Generate nearest predicate.
+
+When nearest predicate is passed to the query, k-nearest neighbour search will be performed.
+
+<b>Distances predicates</b> may be a \c Point. In this the case value closest to \c Point is returned.
+
+It is possible to define how distance between value and query Point is calculated. This is done by passing PointRelation.
+It can be generated by following functions:
+\li \c boost::geometry::index::to_nearest() - default,
+\li \c boost::geometry::index::to_centroid(),
+\li \c boost::geometry::index::to_furthest().
+
+It is possible to define distances bounds, for example that a distance must be between
+min_distance and max_distance. This is done by passing DistancesPredicates which can be generated
+by following functions:
+\li \c boost::geometry::index::unbounded() - default,
+\li \c boost::geometry::index::min_bounded(),
+\li \c boost::geometry::index::max_bounded(),
+\li \c boost::geometry::index::bounded().
+
+MinRelation and MaxRelation describes bounds and can be generated by following functions:
+\li \c boost::geometry::index::to_nearest(),
+\li \c boost::geometry::index::to_centroid(),
+\li \c boost::geometry::index::to_furthest().
+
+\par Example
+\verbatim
+tree.query(bgi::nearest(pt), value);
+tree.query(bgi::nearest(pt) && bgi::intersects(box), value);
+tree.query(bgi::nearest(bgi::to_centroid(pt)) && bgi::within(box), value);
+tree.query(bgi::nearest(bgi::bounded(pt, bgi::to_furthest(10), bgi::to_nearest(20))), value);
+\endverbatim
+
+\warning
+Only one \c nearest() predicate may be used in a query.
+This version may be used only in queries returning one value.
+
+\ingroup predicates
+
+\param dpred The distance predicates.
+*/
+template <typename DistancePredicates> inline
+detail::nearest_one<DistancePredicates>
+nearest(DistancePredicates const& dpred)
+{
+ return detail::nearest_one<DistancePredicates>(dpred);
+}
+
 namespace detail {
 
 // operator! generators

Deleted: sandbox-branches/geometry/index/boost/geometry/index/query_expr.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/query_expr.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,149 +0,0 @@
-// Boost.Geometry Index
-//
-// Query expr
-//
-// Copyright (c) 2011-2013 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
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#ifndef BOOST_GEOMETRY_INDEX_QUERY_EXPR_HPP
-#define BOOST_GEOMETRY_INDEX_QUERY_EXPR_HPP
-
-#include <boost/type_traits/is_same.hpp>
-#include <boost/tuple/tuple.hpp>
-#include <boost/mpl/assert.hpp>
-
-namespace boost { namespace geometry { namespace index { namespace qe {
-
-namespace detail {
-
-// tags
-
-struct intersects_tag {};
-struct within_tag {};
-
-struct nearest_tag {};
-
-// predicates
-
-template <typename T, typename Tag>
-struct predicate
-{
- typedef Tag tag_type;
- predicate(T const& d) : data(d) {}
- T data;
-};
-
-template <typename T>
-struct predicate<T, nearest_tag>
-{
- typedef nearest_tag tag_type;
- predicate(T const& d, size_t k) : data(d), count(k) {}
- T data;
- size_t count;
-};
-
-template <typename T, typename Tuple, size_t I, size_t N>
-struct push_back_impl
-{
- typedef
- boost::tuples::cons<
- typename boost::tuples::element<I, Tuple>::type,
- typename push_back_impl<T, Tuple, I+1, N>::type
- > type;
-
- static type apply(T const& t, Tuple const& tup)
- {
- return
- type(
- boost::get<I>(tup),
- push_back_impl<T, Tuple, I+1, N>::apply(t, tup)
- );
- }
-};
-
-template <typename T, typename Tuple, size_t N>
-struct push_back_impl<T, Tuple, N, N>
-{
- typedef boost::tuples::cons<T, boost::tuples::null_type> type;
-
- static type apply(T const& t, Tuple const&)
- {
- return type(t, boost::tuples::null_type());
- }
-};
-
-template <typename T1, typename Tag1, typename T2, typename Tag2> inline
-boost::tuples::cons<
- predicate<T1, Tag1>,
- boost::tuples::cons<predicate<T2, Tag2>, boost::tuples::null_type>
->
-operator&&(predicate<T1, Tag1> const& p1, predicate<T2, Tag2> const& p2)
-{
- return
- boost::tuples::cons<
- predicate<T1, Tag1>,
- boost::tuples::cons<predicate<T2, Tag2>, boost::tuples::null_type>
- >(
- p1,
- boost::tuples::cons<predicate<T2, Tag2>, boost::tuples::null_type>(p2, boost::tuples::null_type())
- );
-}
-
-template <typename Head, typename Tail, typename T, typename Tag> inline
-typename push_back_impl<
- predicate<T, Tag>,
- boost::tuples::cons<Head, Tail>,
- 0,
- boost::tuples::length<boost::tuples::cons<Head, Tail> >::value
->::type
-operator&&(boost::tuples::cons<Head, Tail> const& t, predicate<T, Tag> const& p)
-{
- return
- push_back_impl<
- predicate<T, Tag>,
- boost::tuples::cons<Head, Tail>,
- 0,
- boost::tuples::length<boost::tuples::cons<Head, Tail> >::value
- >::apply(p, t);
-}
-
-template <typename Tuple, size_t I, size_t N>
-struct find_nearest_impl
-{
- static const size_t value =
- boost::is_same<
- typename boost::tuples::element<I, Tuple>::type::tag_type,
- nearest_tag
- >::value ?
- I :
- find_nearest_impl<Tuple, I+1, N>::value;
-};
-
-template <typename Tuple, size_t N>
-struct find_nearest_impl<Tuple, N, N>
-{
- static const size_t value = N;
-};
-
-} // namespace detail
-
-// predicates generators
-
-template <typename Geometry>
-detail::predicate<Geometry, detail::intersects_tag> intersects(Geometry const& g)
-{
- return detail::predicate<Geometry, detail::intersects_tag>(g);
-}
-
-template <typename DistancePredicates>
-detail::predicate<DistancePredicates, detail::nearest_tag> nearest(DistancePredicates const& p, size_t k)
-{
- return detail::predicate<DistancePredicates, detail::nearest_tag>(p, k);
-}
-
-}}}} // namespace boost::geometry::index::qe
-
-#endif // BOOST_GEOMETRY_INDEX_QUERY_EXPR_HPP

Modified: sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp (original)
+++ sandbox-branches/geometry/index/boost/geometry/index/rtree.hpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -630,6 +630,70 @@
         return result;
     }
 
+ /*!
+ \brief Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
+
+ This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates.
+ Values will be returned only if all predicates are met.
+
+ <b>Spatial predicates</b>
+
+ The simplest form of spatial predicate is a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+ More spatial predicates may be generated by one of the functions listed below:
+ \li \c boost::geometry::index::covered_by(),
+ \li \c boost::geometry::index::disjoint(),
+ \li \c boost::geometry::index::intersects() - default,
+ \li \c boost::geometry::index::overlaps(),
+ \li \c boost::geometry::index::within(),
+
+ It is possible to negate spatial predicates:
+ \li <tt>! boost::geometry::index::covered_by()</tt>,
+ \li <tt>! boost::geometry::index::disjoint()</tt>,
+ \li <tt>! boost::geometry::index::intersects()</tt>,
+ \li <tt>! boost::geometry::index::overlaps()</tt>,
+ \li <tt>! boost::geometry::index::within()</tt>
+
+ <b>Value predicate</b>
+
+ This is a special kind of predicate which allows to pass a user-defined functor which checks
+ if Value should be returned by the query. It's generated by:
+ \li \c boost::geometry::index::value().
+
+ <b>Nearest predicate</b>
+
+ If the nearest predicate is passed a k-nearest neighbor search will be performed. It has two variants.
+ Passing the first one will result in returning k number of values, the second one will result in returning
+ only one, closest value. In both cases values will be returned to the output iterator. Only one nearest
+ predicate may be passed to the query. It may be generated by:
+ \li \c boost::geometry::index::nearest().
+
+ <b>Connecting predicates</b>
+
+ A set of predicates may be generated by:
+ \li \c std::make_pair()
+ \li \c boost::make_tuple()
+ \li \c operator&&()
+
+ \par Example
+ \verbatim
+ tree.query(box1, std::back_inserter(result));
+ tree.query(std::make_pair(bgi::intersects(poly), !bgi::within(box)), std::back_inserter(result));
+ tree.query(bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
+ tree.query(bgi::overlaps(box) && bgi::value(my_fun), std::back_inserter(result));
+ tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+ \endverbatim
+
+ \warning
+ Only one \c nearest() perdicate may be passed to the query.
+
+ \param predicates Predicates.
+ \param out_it The output iterator, e.g. generated by std::back_inserter().
+
+ \return The number of values found.
+
+ \par Throws
+ If Value copy constructor or copy assignment throws.
+ */
     template <typename Predicates, typename OutIter>
     size_type query(Predicates const& predicates, OutIter out_it) const
     {
@@ -640,13 +704,73 @@
         return query_dispatch(predicates, out_it, boost::mpl::bool_<is_nearest>());
     }
 
+ /*!
+ \brief Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box.
+
+ This query function performs k-nearest neighbor searches. It allows to pass a set of predicates.
+ The value will be returned only if all predicates are met. This query requires that one of the
+ predicates must be one-value \c nearest() predicate.
+
+ <b>Spatial predicates</b>
+
+ The simplest form of spatial predicate is a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+ More spatial predicates may be generated by one of the functions listed below:
+ \li \c boost::geometry::index::covered_by(),
+ \li \c boost::geometry::index::disjoint(),
+ \li \c boost::geometry::index::intersects() - default,
+ \li \c boost::geometry::index::overlaps(),
+ \li \c boost::geometry::index::within(),
+
+ It is possible to negate spatial predicates:
+ \li <tt>! boost::geometry::index::covered_by()</tt>,
+ \li <tt>! boost::geometry::index::disjoint()</tt>,
+ \li <tt>! boost::geometry::index::intersects()</tt>,
+ \li <tt>! boost::geometry::index::overlaps()</tt>,
+ \li <tt>! boost::geometry::index::within()</tt>
+
+ <b>Value predicate</b>
+
+ This is a special kind of predicate which allows to pass a user-defined functor which checks
+ if Value should be returned by the query. It's generated by:
+ \li \c boost::geometry::index::value().
+
+ <b>Nearest predicate</b>
+
+ This query requires that one of the predicates must be one-value \c nearest() predicate.
+ It may be generated by \c nearest() taking only one parameter - distance predicates.
+ \li \c boost::geometry::index::nearest().
+
+ <b>Connecting predicates</b>
+
+ A set of predicates may be generated by:
+ \li \c std::make_pair()
+ \li \c boost::make_tuple()
+ \li \c operator&&()
+
+ \par Example
+ \verbatim
+ tree.query(std::make_pair(bgi::nearest(pt), bgi::within(box)), value);
+ tree.query(bgi::nearest(pt) && bgi::intersects(poly), value);
+ \endverbatim
+
+ \warning
+ This query requires that one of the predicates must be one-value \c nearest() predicate.
+
+ \param predicates Predicates.
+ \param value The reference to value which will hold the result of the query.
+
+ \return The number of values found (1 if value was found, 0 otherwise).
+
+ \par Throws
+ If Value copy constructor or copy assignment throws.
+ */
     template <typename Predicates>
- size_type query(Predicates const& predicates, value_type & v) const
+ size_type query(Predicates const& predicates, value_type & value) const
     {
         static const unsigned nearest_count = detail::predicates_count_nearest<Predicates>::value;
         BOOST_MPL_ASSERT_MSG((nearest_count == 1), PASS_ONE_VALUE_NEAREST_PREDICATE_TO_GET_VALUE_AS_RESULT, (Predicates));
 
- return query_dispatch(predicates, v, boost::mpl::bool_<true>());
+ return query_dispatch(predicates, value, boost::mpl::bool_<true>());
     }
 
 private:
@@ -1461,22 +1585,152 @@
     return tree.remove(rng);
 }
 
+/*!
+\brief Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
+
+This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates.
+Values will be returned only if all predicates are met.
+
+<b>Spatial predicates</b>
+
+The simplest form of spatial predicate is a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+More spatial predicates may be generated by one of the functions listed below:
+\li \c boost::geometry::index::covered_by(),
+\li \c boost::geometry::index::disjoint(),
+\li \c boost::geometry::index::intersects() - default,
+\li \c boost::geometry::index::overlaps(),
+\li \c boost::geometry::index::within(),
+
+It is possible to negate spatial predicates:
+\li <tt>! boost::geometry::index::covered_by()</tt>,
+\li <tt>! boost::geometry::index::disjoint()</tt>,
+\li <tt>! boost::geometry::index::intersects()</tt>,
+\li <tt>! boost::geometry::index::overlaps()</tt>,
+\li <tt>! boost::geometry::index::within()</tt>
+
+<b>Value predicate</b>
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks
+if Value should be returned by the query. It's generated by:
+\li \c boost::geometry::index::value().
+
+<b>Nearest predicate</b>
+
+If the nearest predicate is passed a k-nearest neighbor search will be performed. It has two variants.
+Passing the first one will result in returning k number of values, the second one will result in returning
+only one, closest value. In both cases values will be returned to the output iterator. Only one nearest
+predicate may be passed to the query. It may be generated by:
+\li \c boost::geometry::index::nearest().
+
+<b>Connecting predicates</b>
+
+A set of predicates may be generated by:
+\li \c std::make_pair()
+\li \c boost::make_tuple()
+\li \c operator&&()
+
+\par Example
+\verbatim
+bgi::query(tree, box1, std::back_inserter(result));
+bgi::query(tree, std::make_pair(bgi::intersects(poly), !bgi::within(box)), std::back_inserter(result));
+bgi::query(tree, bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
+bgi::query(tree, bgi::overlaps(box) && bgi::value(my_fun), std::back_inserter(result));
+bgi::query(tree, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+\endverbatim
+
+\warning
+Only one \c nearest() perdicate may be passed to the query.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param predicates Predicates.
+\param out_it The output iterator, e.g. generated by std::back_inserter().
+
+\return The number of values found.
+
+\par Throws
+If Value copy constructor or copy assignment throws.
+*/
 template <typename Value, typename Options, typename Translator, typename Allocator, typename Predicates, typename OutIter> inline
 typename rtree<Value, Options, Translator, Allocator>::size_type
 query(rtree<Value, Options, Translator, Allocator> const& tree,
- Predicates const& pred,
+ Predicates const& predicates,
       OutIter out_it)
 {
- return tree.query(pred, out_it);
+ return tree.query(predicates, out_it);
 }
 
+/*!
+\brief Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box.
+
+This query function performs k-nearest neighbor searches. It allows to pass a set of predicates.
+The value will be returned only if all predicates are met. This query requires that one of the
+predicates must be one-value \c nearest() predicate.
+
+<b>Spatial predicates</b>
+
+The simplest form of spatial predicate is a \c Geometry. In this case Values intersecting the \c Geometry are returned.
+More spatial predicates may be generated by one of the functions listed below:
+\li \c boost::geometry::index::covered_by(),
+\li \c boost::geometry::index::disjoint(),
+\li \c boost::geometry::index::intersects() - default,
+\li \c boost::geometry::index::overlaps(),
+\li \c boost::geometry::index::within(),
+
+It is possible to negate spatial predicates:
+\li <tt>! boost::geometry::index::covered_by()</tt>,
+\li <tt>! boost::geometry::index::disjoint()</tt>,
+\li <tt>! boost::geometry::index::intersects()</tt>,
+\li <tt>! boost::geometry::index::overlaps()</tt>,
+\li <tt>! boost::geometry::index::within()</tt>
+
+<b>Value predicate</b>
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks
+if Value should be returned by the query. It's generated by:
+\li \c boost::geometry::index::value().
+
+<b>Nearest predicate</b>
+
+This query requires that one of the predicates must be one-value \c nearest() predicate.
+It may be generated by \c nearest() taking only one parameter - distance predicates.
+\li \c boost::geometry::index::nearest().
+
+<b>Connecting predicates</b>
+
+A set of predicates may be generated by:
+\li \c std::make_pair()
+\li \c boost::make_tuple()
+\li \c operator&&()
+
+\par Example
+\verbatim
+bgi::query(tree, std::make_pair(bgi::nearest(pt), bgi::within(box)), value);
+bgi::query(tree, bgi::nearest(pt) && bgi::intersects(poly), value);
+\endverbatim
+
+\warning
+This query requires that one of the predicates must be one-value \c nearest() predicate.
+
+\ingroup rtree_functions
+
+\param tree The spatial index.
+\param predicates Predicates.
+\param value The reference to value which will hold the result of the query.
+
+\return The number of values found (1 if value was found, 0 otherwise).
+
+\par Throws
+If Value copy constructor or copy assignment throws.
+*/
 template <typename Value, typename Options, typename Translator, typename Allocator, typename Predicates> inline
 typename rtree<Value, Options, Translator, Allocator>::size_type
 query(rtree<Value, Options, Translator, Allocator> const& tree,
- Predicates const& pred,
- typename rtree<Value, Options, Translator, Allocator>::value_type & v)
+ Predicates const& predicates,
+ typename rtree<Value, Options, Translator, Allocator>::value_type & value)
 {
- return tree.query(pred, v);
+ return tree.query(predicates, value);
 }
 
 /*!

Modified: sandbox-branches/geometry/index/doc/generated/adaptors.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/adaptors.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/adaptors.qbk 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -6,6 +6,7 @@
 [[Function][Description]]
 [[[link group__adaptors_1ga8e094e1f312fc00336a3536f51a69468 `nearest_queried(DistancesPredicates const &, size_t, Predicates const &)`]][The nearest query index adaptor generator. ]]
 [[[link group__adaptors_1ga3478395ded5855dc0b6c2f36a89de9f6 `nearest_queried(DistancesPredicates const &, size_t)`]][The nearest query index adaptor generator. ]]
+[[[link group__adaptors_1ga4716cd5423bfed3ff3e69e9ec274ac81 `queried(Predicates const &)`]][The query index adaptor generator. ]]
 [[[link group__adaptors_1ga3068771f0f9cca706269ec35a809db2a `spatial_queried(Predicates const &)`]][The spatial query index adaptor generator. ]]
 ]
 
@@ -48,6 +49,23 @@
 ]
 [endsect]
 
+[#group__adaptors_1ga4716cd5423bfed3ff3e69e9ec274ac81]
+[section queried(Predicates const &)]
+The query index adaptor generator.
+
+[heading Synopsis]
+[pre
+`template<``typename Predicates``>`
+`detail::query<Predicates> boost::geometry::index::adaptors::queried``(``Predicates const &` `pred``)`
+]
+
+[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`Predicates const &`][ `pred` ][Predicates. ]]
+]
+[endsect]
+
 [#group__adaptors_1ga3068771f0f9cca706269ec35a809db2a]
 [section spatial_queried(Predicates const &)]
 The spatial query index adaptor generator.

Modified: sandbox-branches/geometry/index/doc/generated/distance_predicates.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/distance_predicates.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/distance_predicates.qbk 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -4,9 +4,9 @@
 [heading Functions]
 [table
 [[Function][Description]]
-[[[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 `to_nearest(T const &)`]][Generate [link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 to_nearest()] Point-Indexable relationship. ]]
-[[[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 `to_centroid(T const &)`]][Generate [link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 to_centroid()] Point-Indexable relationship. ]]
-[[[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 `to_furthest(T const &)`]][Generate [link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 to_furthest()] Point-Indexable relationship. ]]
+[[[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 `to_nearest(T const &)`]][Generate [link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 to_nearest()] relationship. ]]
+[[[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 `to_centroid(T const &)`]][Generate [link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 to_centroid()] relationship. ]]
+[[[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 `to_furthest(T const &)`]][Generate [link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 to_furthest()] relationship. ]]
 [[[link group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db `unbounded(PointRelation const &)`]][Generate [link group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db unbounded()] distance predicate. ]]
 [[[link group__distance__predicates_1ga39c7c94776ab840e164848e53d376098 `min_bounded(PointRelation const &, MinRelation const &)`]][Generate [link group__distance__predicates_1ga39c7c94776ab840e164848e53d376098 min_bounded()] distance predicate. ]]
 [[[link group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079 `max_bounded(PointRelation const &, MaxRelation const &)`]][Generate [link group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079 max_bounded()] distance predicate. ]]
@@ -15,7 +15,7 @@
 
 [#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636]
 [section to_nearest(T const &)]
-Generate [link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 to_nearest()] Point-Indexable relationship.
+Generate [link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 to_nearest()] relationship.
 
 [heading Description]
 Generate a nearest query Point and Value's Indexable relationship while calculating distances. This function may be used to define that knn query should calculate distances as smallest as possible between query Point and Indexable's points. In other words it should be the distance to the nearest Indexable's point. This function may be also used to define distances bounds which indicates that Indexable's nearest point should be closer or further than value v. This is default relation.[heading Synopsis]
@@ -27,19 +27,19 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Description]]
-[[`T`][Type of wrapped object. This may be a Point for PointRelation or some Value for MinRelation or MaxRelation]]
+[[`T`][Type of wrapped object. This may be a Point for PointRelation or CoordinateType for MinRelation or MaxRelation]]
 ]
 
 [heading Parameter(s)]
 [table
 [[Type][Name][Description]]
-[[`T const &`][ `v` ][Point or bound value. ]]
+[[`T const &`][ `v` ][Point or distance value. ]]
 ]
 [endsect]
 
 [#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0]
 [section to_centroid(T const &)]
-Generate [link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 to_centroid()] Point-Indexable relationship.
+Generate [link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 to_centroid()] relationship.
 
 [heading Description]
 Generate a nearest query Point and Value's Indexable relationship while calculating distances. This function may be used to define that knn query should calculate distances between query Point and Indexable's centroid. This function may be also used to define distances bounds which indicates that Indexable's centroid should be closer or further than value v.[heading Synopsis]
@@ -51,19 +51,19 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Description]]
-[[`T`][Type of wrapped object. This may be a Point for PointRelation or some Value for MinRelation or MaxRelation]]
+[[`T`][Type of wrapped object. This may be a Point for PointRelation or some CoordinateType for MinRelation or MaxRelation]]
 ]
 
 [heading Parameter(s)]
 [table
 [[Type][Name][Description]]
-[[`T const &`][ `v` ][Point or bound value. ]]
+[[`T const &`][ `v` ][Point or distance value. ]]
 ]
 [endsect]
 
 [#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02]
 [section to_furthest(T const &)]
-Generate [link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 to_furthest()] Point-Indexable relationship.
+Generate [link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 to_furthest()] relationship.
 
 [heading Description]
 Generate a nearest query Point and Value's Indexable relationship while calculating distances. This function may be used to define that knn query should calculate distances as biggest as possible between query Point and Indexable's points. In other words it should be the distance to the furthest Indexable's point. This function may be also used to define distances bounds which indicates that Indexable's furthest point should be closer or further than value v.[heading Synopsis]
@@ -75,13 +75,13 @@
 [heading Template parameter(s)]
 [table
 [[Parameter] [Description]]
-[[`T`][Type of wrapped object. This may be a Point for PointRelation or some Value for MinRelation or MaxRelation]]
+[[`T`][Type of wrapped object. This may be a Point for PointRelation or some CoordinateType for MinRelation or MaxRelation]]
 ]
 
 [heading Parameter(s)]
 [table
 [[Type][Name][Description]]
-[[`T const &`][ `v` ][Point or bound value. ]]
+[[`T const &`][ `v` ][Point or distance value. ]]
 ]
 [endsect]
 

Modified: sandbox-branches/geometry/index/doc/generated/predicates.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/predicates.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/predicates.qbk 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -1,6 +1,6 @@
 [/ Generated by doxygen_xml2qbk, don't change, will be overwritten automatically]
 [/ Generated from xml/group__predicates.xml]
-[section:group__predicates Spatial predicates (boost::geometry::index::)]
+[section:group__predicates Predicates (boost::geometry::index::)]
 [heading Functions]
 [table
 [[Function][Description]]
@@ -10,6 +10,8 @@
 [[[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 `overlaps(Geometry const &)`]][Generate [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 overlaps()]] predicate. ]]
 [[[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d `within(Geometry const &)`]][Generate [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d within()]] predicate. ]]
 [[[link group__predicates_1ga8acb81106fce01da72f310184ab4d9ce `value(Fun const &)`]][Generate value predicate. ]]
+[[[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b `nearest(DistancePredicates const &, unsigned)`]][Generate nearest predicate. ]]
+[[[link group__predicates_1ga54f507955e8dba2c928d6592d5970638 `nearest(DistancePredicates const &)`]][Generate nearest predicate. ]]
 ]
 
 [#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61]
@@ -156,5 +158,116 @@
 ]
 [endsect]
 
+[#group__predicates_1ga162233fd11b980853f8b8335cb70d57b]
+[section nearest(DistancePredicates const &, unsigned)]
+Generate nearest predicate.
+
+[heading Description]
+When nearest predicate is passed to the query, k-nearest neighbour search will be performed.
+
+[*Distances predicates] may be a [^`Point`]. In this the case values closest to [^`Point`] are returned.
+
+It is possible to define how distance between values and query Point is calculated. This is done by passing PointRelation. It can be generated by following functions:
+
+* [^[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 boost::geometry::index::to_nearest()]] - default,
+* [^[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 boost::geometry::index::to_centroid()]],
+* [^[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 boost::geometry::index::to_furthest()]].
+
+
+It is possible to define distances bounds, for example that a distance must be between min_distance and max_distance. This is done by passing DistancesPredicates which can be generated by following functions:
+
+* [^[link group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db boost::geometry::index::unbounded()]] - default,
+* [^[link group__distance__predicates_1ga39c7c94776ab840e164848e53d376098 boost::geometry::index::min_bounded()]],
+* [^[link group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079 boost::geometry::index::max_bounded()]],
+* [^[link group__distance__predicates_1ga20621ca608b1420c38182346b965f347 boost::geometry::index::bounded()]].
+
+
+MinRelation and MaxRelation describes bounds and can be generated by following functions:
+
+* [^[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 boost::geometry::index::to_nearest()]],
+* [^[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 boost::geometry::index::to_centroid()]],
+* [^[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 boost::geometry::index::to_furthest()]].
+
+[heading Synopsis]
+[pre
+`template<``typename DistancePredicates``>`
+`detail::nearest<DistancePredicates> boost::geometry::index::nearest``(``DistancePredicates const &` `dpred``,` `unsigned` `k``)`
+]
+
+[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`DistancePredicates const &`][ `dpred` ][The distance predicates. ]]
+[[`unsigned`][ `k` ][The maximum number of values to return. ]]
+]
+[heading Example]
+
+``
+tree.query(bgi::nearest(pt, 5), std::back_inserter(result));
+tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+tree.query(bgi::nearest(bgi::to_centroid(pt), 5) && bgi::within(box), std::back_inserter(result));
+tree.query(bgi::nearest(bgi::bounded(pt, bgi::to_furthest(10), bgi::to_nearest(20)), 5), std::back_inserter(result));
+``
+
+
+[warning Only one [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate may be used in a query. This version may be used only in queries returning a set of values - using output iterator.]
+
+[endsect]
+
+[#group__predicates_1ga54f507955e8dba2c928d6592d5970638]
+[section nearest(DistancePredicates const &)]
+Generate nearest predicate.
+
+[heading Description]
+When nearest predicate is passed to the query, k-nearest neighbour search will be performed.
+
+[*Distances predicates] may be a [^`Point`]. In this the case value closest to [^`Point`] is returned.
+
+It is possible to define how distance between value and query Point is calculated. This is done by passing PointRelation. It can be generated by following functions:
+
+* [^[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 boost::geometry::index::to_nearest()]] - default,
+* [^[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 boost::geometry::index::to_centroid()]],
+* [^[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 boost::geometry::index::to_furthest()]].
+
+
+It is possible to define distances bounds, for example that a distance must be between min_distance and max_distance. This is done by passing DistancesPredicates which can be generated by following functions:
+
+* [^[link group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db boost::geometry::index::unbounded()]] - default,
+* [^[link group__distance__predicates_1ga39c7c94776ab840e164848e53d376098 boost::geometry::index::min_bounded()]],
+* [^[link group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079 boost::geometry::index::max_bounded()]],
+* [^[link group__distance__predicates_1ga20621ca608b1420c38182346b965f347 boost::geometry::index::bounded()]].
+
+
+MinRelation and MaxRelation describes bounds and can be generated by following functions:
+
+* [^[link group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636 boost::geometry::index::to_nearest()]],
+* [^[link group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0 boost::geometry::index::to_centroid()]],
+* [^[link group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02 boost::geometry::index::to_furthest()]].
+
+[heading Synopsis]
+[pre
+`template<``typename DistancePredicates``>`
+`detail::nearest_one<DistancePredicates> boost::geometry::index::nearest``(``DistancePredicates const &` `dpred``)`
+]
+
+[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`DistancePredicates const &`][ `dpred` ][The distance predicates. ]]
+]
+[heading Example]
+
+``
+tree.query(bgi::nearest(pt), value);
+tree.query(bgi::nearest(pt) && bgi::intersects(box), value);
+tree.query(bgi::nearest(bgi::to_centroid(pt)) && bgi::within(box), value);
+tree.query(bgi::nearest(bgi::bounded(pt, bgi::to_furthest(10), bgi::to_nearest(20))), value);
+``
+
+
+[warning Only one [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate may be used in a query. This version may be used only in queries returning one value.]
+
+[endsect]
+
 [endsect]
 

Modified: sandbox-branches/geometry/index/doc/generated/rtree.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree.qbk 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -99,6 +99,8 @@
 [[][[link classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a `remove(value_type const &)`]][Remove a value from the container. ]]
 [[][[link classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd `remove(Iterator, Iterator)`]][Remove a range of values from the container. ]]
 [[][[link classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c `remove(Range const &)`]][Remove a range of values from the container. ]]
+[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949 `query(Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]]
+[[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1abd965047110c9f8ef6ff097e97487312 `query(Predicates const &, value_type &)`]][Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box. ]]
 [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920 `spatial_query(Predicates const &, OutIter)`]][Finds values meeting spatial predicates, e.g. intersecting some Box. ]]
 [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909 `nearest_query(DistancesPredicates const &, value_type &)`]][Finds one value meeting distances predicates, e.g. nearest to some Point. ]]
 [[ `const`][[link classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc `nearest_query(DistancesPredicates const &, Predicates const &, value_type &)`]][Finds one value meeting distances predicates and spatial predicates, e.g. nearest to some Point and intersecting some Box. ]]
@@ -605,6 +607,161 @@
 
 [endsect]
 
+[#classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949]
+[section query(Predicates const &, OutIter)]
+Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
+
+[heading Description]
+This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates. Values will be returned only if all predicates are met.
+
+[*Spatial predicates]
+
+The simplest form of spatial predicate is a [^`Geometry`]. In this case Values intersecting the [^`Geometry`] are returned. More spatial predicates may be generated by one of the functions listed below:
+
+* [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]] - default,
+* [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]],
+
+
+It is possible to negate spatial predicates:
+
+* [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
+* [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]]
+
+[*Value predicate]
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks if Value should be returned by the query. It's generated by:
+
+* [^[link group__predicates_1ga8acb81106fce01da72f310184ab4d9ce boost::geometry::index::value()]].
+
+[*Nearest predicate]
+
+If the nearest predicate is passed a k-nearest neighbor search will be performed. It has two variants. Passing the first one will result in returning k number of values, the second one will result in returning only one, closest value. In both cases values will be returned to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by:
+
+* [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b boost::geometry::index::nearest()]].
+
+[*Connecting predicates]
+
+A set of predicates may be generated by:
+
+* [^`std::make_pair()`]
+* [^`boost::make_tuple()`]
+* [^`operator&&()`]
+
+[heading Synopsis]
+[pre
+`template<``typename Predicates``,` `typename OutIter``>`
+[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `query``(``Predicates const &` `predicates``,` `OutIter` `out_it``)`
+]
+
+[heading Modifier(s)]
+``const ``[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`Predicates const &`][ `predicates` ][Predicates. ]]
+[[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]]
+]
+[heading Returns]
+The number of values found.
+[heading Example]
+
+``
+tree.query(box1, std::back_inserter(result));
+tree.query(std::make_pair(bgi::intersects(poly), !bgi::within(box)), std::back_inserter(result));
+tree.query(bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
+tree.query(bgi::overlaps(box) && bgi::value(my_fun), std::back_inserter(result));
+tree.query(bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+``
+
+
+[heading Throws]
+If Value copy constructor or copy assignment throws.
+
+[warning Only one [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] perdicate may be passed to the query.]
+
+[endsect]
+
+[#classboost_1_1geometry_1_1index_1_1rtree_1abd965047110c9f8ef6ff097e97487312]
+[section query(Predicates const &, value_type &)]
+Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box.
+
+[heading Description]
+This query function performs k-nearest neighbor searches. It allows to pass a set of predicates. The value will be returned only if all predicates are met. This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate.
+
+[*Spatial predicates]
+
+The simplest form of spatial predicate is a [^`Geometry`]. In this case Values intersecting the [^`Geometry`] are returned. More spatial predicates may be generated by one of the functions listed below:
+
+* [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]] - default,
+* [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]],
+
+
+It is possible to negate spatial predicates:
+
+* [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
+* [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]]
+
+[*Value predicate]
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks if Value should be returned by the query. It's generated by:
+
+* [^[link group__predicates_1ga8acb81106fce01da72f310184ab4d9ce boost::geometry::index::value()]].
+
+[*Nearest predicate]
+
+This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate. It may be generated by [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] taking only one parameter - distance predicates.
+
+* [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b boost::geometry::index::nearest()]].
+
+[*Connecting predicates]
+
+A set of predicates may be generated by:
+
+* [^`std::make_pair()`]
+* [^`boost::make_tuple()`]
+* [^`operator&&()`]
+
+[heading Synopsis]
+[pre
+`template<``typename Predicates``>`
+[^[link classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6 size_type]] `query``(``Predicates const &` `predicates``,` [^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` &` `value``)`
+]
+
+[heading Modifier(s)]
+``const ``[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`Predicates const &`][ `predicates` ][Predicates. ]]
+[[[^[link classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb value_type]]` &`][ `value` ][The reference to value which will hold the result of the query.]]
+]
+[heading Returns]
+The number of values found (1 if value was found, 0 otherwise).
+[heading Example]
+
+``
+tree.query(std::make_pair(bgi::nearest(pt), bgi::within(box)), value);
+tree.query(bgi::nearest(pt) && bgi::intersects(poly), value);
+``
+
+
+[heading Throws]
+If Value copy constructor or copy assignment throws.
+
+[warning This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate.]
+
+[endsect]
+
 [#classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920]
 [section spatial_query(Predicates const &, OutIter)]
 Finds values meeting spatial predicates, e.g. intersecting some Box.

Modified: sandbox-branches/geometry/index/doc/generated/rtree_functions.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/generated/rtree_functions.qbk (original)
+++ sandbox-branches/geometry/index/doc/generated/rtree_functions.qbk 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -10,6 +10,8 @@
 [[[link group__rtree__functions_1gad40492a5b99c3eebbd51901574762527 `remove(rtree<...> &, Value const &)`]][Remove a value from the container. ]]
 [[[link group__rtree__functions_1ga0219361de8b15c539af3f9bd027938ce `remove(rtree<...> &, Iterator, Iterator)`]][Remove a range of values from the container. ]]
 [[[link group__rtree__functions_1ga5885d6c90a91f238f72ab9b5ef24daf9 `remove(rtree<...> &, Range const &)`]][Remove a range of values from the container. ]]
+[[[link group__rtree__functions_1ga86e0808522ef6682b72b310a3891b276 `query(rtree<...> const &, Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]]
+[[[link group__rtree__functions_1ga35b54dcaed4e4d5fb38e9ef4b78ee3c7 `query(rtree<...> const &, Predicates const &, typename rtree<...>::value_type &)`]][Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box. ]]
 [[[link group__rtree__functions_1gadcec162d2391c2c9cc4215a5578d1721 `spatial_query(rtree<...> const &, Predicates const &, OutIter)`]][Find values meeting spatial predicates. ]]
 [[[link group__rtree__functions_1gacabbd521b88b67a700e1246e5889d343 `nearest_query(rtree<...> const &, DistancesPredicates const &, Value &)`]][Find the value meeting distances predicates. ]]
 [[[link group__rtree__functions_1gaf963f417d4ab54a2782928020dd8c3ad `nearest_query(rtree<...> const &, DistancesPredicates const &, Predicates const &, Value &)`]][Find the value meeting distances and spatial predicates. ]]
@@ -175,6 +177,174 @@
 The number of removed values.
 [endsect]
 
+[#group__rtree__functions_1ga86e0808522ef6682b72b310a3891b276]
+[section query(rtree<...> const &, Predicates const &, OutIter)]
+Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box.
+
+[heading Description]
+This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates. Values will be returned only if all predicates are met.
+
+[*Spatial predicates]
+
+The simplest form of spatial predicate is a [^`Geometry`]. In this case Values intersecting the [^`Geometry`] are returned. More spatial predicates may be generated by one of the functions listed below:
+
+* [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]] - default,
+* [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]],
+
+
+It is possible to negate spatial predicates:
+
+* [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
+* [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]]
+
+[*Value predicate]
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks if Value should be returned by the query. It's generated by:
+
+* [^[link group__predicates_1ga8acb81106fce01da72f310184ab4d9ce boost::geometry::index::value()]].
+
+[*Nearest predicate]
+
+If the nearest predicate is passed a k-nearest neighbor search will be performed. It has two variants. Passing the first one will result in returning k number of values, the second one will result in returning only one, closest value. In both cases values will be returned to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by:
+
+* [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b boost::geometry::index::nearest()]].
+
+[*Connecting predicates]
+
+A set of predicates may be generated by:
+
+* [^`std::make_pair()`]
+* [^`boost::make_tuple()`]
+* [^`operator&&()`]
+
+[heading Synopsis]
+[pre
+`template<``typename Value``,`
+ `typename Options``,`
+ `typename Translator``,`
+ `typename Allocator``,`
+ `typename Predicates``,`
+ `typename OutIter``>`
+`rtree<Value, Options, Translator, Allocator>::size_type boost::geometry::index::query``(``rtree< Value, Options, Translator, Allocator > const &` `tree``,`
+ `Predicates const &` `predicates``,`
+ `OutIter` `out_it``)`
+]
+
+[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`rtree< Value, Options, Translator, Allocator > const &`][ `tree` ][The spatial index. ]]
+[[`Predicates const &`][ `predicates` ][Predicates. ]]
+[[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]]
+]
+[heading Returns]
+The number of values found.
+[heading Example]
+
+``
+bgi::query(tree, box1, std::back_inserter(result));
+bgi::query(tree, std::make_pair(bgi::intersects(poly), !bgi::within(box)), std::back_inserter(result));
+bgi::query(tree, bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result));
+bgi::query(tree, bgi::overlaps(box) && bgi::value(my_fun), std::back_inserter(result));
+bgi::query(tree, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
+``
+
+
+[heading Throws]
+If Value copy constructor or copy assignment throws.
+
+[warning Only one [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] perdicate may be passed to the query.]
+
+[endsect]
+
+[#group__rtree__functions_1ga35b54dcaed4e4d5fb38e9ef4b78ee3c7]
+[section query(rtree<...> const &, Predicates const &, typename rtree<...>::value_type &)]
+Finds value meeting passed predicates e.g. nearest to some Point and intersecting some Box.
+
+[heading Description]
+This query function performs k-nearest neighbor searches. It allows to pass a set of predicates. The value will be returned only if all predicates are met. This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate.
+
+[*Spatial predicates]
+
+The simplest form of spatial predicate is a [^`Geometry`]. In this case Values intersecting the [^`Geometry`] are returned. More spatial predicates may be generated by one of the functions listed below:
+
+* [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]] - default,
+* [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]],
+
+
+It is possible to negate spatial predicates:
+
+* [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]],
+* [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]],
+* [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]],
+* [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]],
+* [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]]
+
+[*Value predicate]
+
+This is a special kind of predicate which allows to pass a user-defined functor which checks if Value should be returned by the query. It's generated by:
+
+* [^[link group__predicates_1ga8acb81106fce01da72f310184ab4d9ce boost::geometry::index::value()]].
+
+[*Nearest predicate]
+
+This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate. It may be generated by [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] taking only one parameter - distance predicates.
+
+* [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b boost::geometry::index::nearest()]].
+
+[*Connecting predicates]
+
+A set of predicates may be generated by:
+
+* [^`std::make_pair()`]
+* [^`boost::make_tuple()`]
+* [^`operator&&()`]
+
+[heading Synopsis]
+[pre
+`template<``typename Value``,`
+ `typename Options``,`
+ `typename Translator``,`
+ `typename Allocator``,`
+ `typename Predicates``>`
+`rtree<Value, Options, Translator, Allocator>::size_type boost::geometry::index::query``(``rtree< Value, Options, Translator, Allocator > const &` `tree``,`
+ `Predicates const &` `predicates``,`
+ `typename rtree< Value, Options, Translator, Allocator >::value_type &` `value``)`
+]
+
+[heading Parameter(s)]
+[table
+[[Type][Name][Description]]
+[[`rtree< Value, Options, Translator, Allocator > const &`][ `tree` ][The spatial index. ]]
+[[`Predicates const &`][ `predicates` ][Predicates. ]]
+[[`typename rtree< Value, Options, Translator, Allocator >::value_type &`][ `value` ][The reference to value which will hold the result of the query.]]
+]
+[heading Returns]
+The number of values found (1 if value was found, 0 otherwise).
+[heading Example]
+
+``
+bgi::query(tree, std::make_pair(bgi::nearest(pt), bgi::within(box)), value);
+bgi::query(tree, bgi::nearest(pt) && bgi::intersects(poly), value);
+``
+
+
+[heading Throws]
+If Value copy constructor or copy assignment throws.
+
+[warning This query requires that one of the predicates must be one-value [^[link group__predicates_1ga162233fd11b980853f8b8335cb70d57b nearest()]] predicate.]
+
+[endsect]
+
 [#group__rtree__functions_1gadcec162d2391c2c9cc4215a5578d1721]
 [section spatial_query(rtree<...> const &, Predicates const &, OutIter)]
 Find values meeting spatial predicates.

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -81,8 +81,8 @@
         related to the rtree</a></span></dt>
 <dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.parameters">R-tree
         parameters</a></span></dt>
-<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__predicates">Spatial
- predicates (boost::geometry::index::)</a></span></dt>
+<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__predicates">Predicates
+ (boost::geometry::index::)</a></span></dt>
 <dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__distance__predicates">Distance
         predicates (boost::geometry::index::)</a></span></dt>
 <dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__adaptors">Adaptors

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -31,8 +31,8 @@
         related to the rtree</a></span></dt>
 <dt><span class="section"><a href="reference.html#geometry_index.r_tree.reference.parameters">R-tree
         parameters</a></span></dt>
-<dt><span class="section"><a href="reference.html#geometry_index.r_tree.reference.group__predicates">Spatial
- predicates (boost::geometry::index::)</a></span></dt>
+<dt><span class="section"><a href="reference.html#geometry_index.r_tree.reference.group__predicates">Predicates
+ (boost::geometry::index::)</a></span></dt>
 <dt><span class="section"><a href="reference.html#geometry_index.r_tree.reference.group__distance__predicates">Distance
         predicates (boost::geometry::index::)</a></span></dt>
 <dt><span class="section"><a href="reference.html#geometry_index.r_tree.reference.group__adaptors">Adaptors
@@ -47,7 +47,7 @@
 <a name="geometry_index.r_tree.reference.boost_geometry_index_rtree"></a><a name="classboost_1_1geometry_1_1index_1_1rtree"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree" title="boost::geometry::index::rtree">boost::geometry::index::rtree</a>
 </h4></div></div></div>
 <p>
- <a class="indexterm" name="id887504"></a><a class="indexterm" name="id887509"></a><a class="indexterm" name="id887514"></a><a class="indexterm" name="id887518"></a>
+ <a class="indexterm" name="id894058"></a><a class="indexterm" name="id894062"></a><a class="indexterm" name="id894067"></a><a class="indexterm" name="id894072"></a>
 The R-tree spatial index.
         </p>
 <h6>
@@ -625,6 +625,45 @@
                 </td>
 <td>
                   <p>
+ <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949"><code class="computeroutput"><span class="identifier">query</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Finds values meeting passed predicates e.g. nearest to some Point
+ and/or intersecting some Box.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">const</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1abd965047110c9f8ef6ff097e97487312"><code class="computeroutput"><span class="identifier">query</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;,</span> <span class="identifier">value_type</span>
+ <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Finds value meeting passed predicates e.g. nearest to some Point
+ and intersecting some Box.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">const</span></code>
+ </p>
+ </td>
+<td>
+ <p>
                     <a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920"><code class="computeroutput"><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a>
                   </p>
@@ -2608,23 +2647,30 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_" title="spatial_query(Predicates const &amp;, OutIter)">spatial_query(Predicates
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a25ce2ead0e8a2d270105f4958237e949"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_" title="query(Predicates const &amp;, OutIter)">query(Predicates
           const &amp;, OutIter)</a>
 </h5></div></div></div>
 <p>
- Finds values meeting spatial predicates, e.g. intersecting some Box.
+ Finds values meeting passed predicates e.g. nearest to some Point and/or
+ intersecting some Box.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description">Description</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
- <span class="bold"><strong>Spatial predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>. In this case Values
- intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
- are returned.
+ This query function performs spatial and k-nearest neighbor searches.
+ It allows to pass a set of predicates. Values will be returned only if
+ all predicates are met.
           </p>
 <p>
- It may be generated by one of the functions listed below:
+ <span class="bold"><strong>Spatial predicates</strong></span>
+ </p>
+<p>
+ The simplest form of spatial predicate is a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>.
+ In this case Values intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned. More spatial predicates may be generated by one of the
+ functions listed below:
           </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
@@ -2643,6 +2689,11 @@
 <li class="listitem">
                 <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
               </li>
+</ul></div>
+<p>
+ It is possible to negate spatial predicates:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
                 <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
@@ -2658,24 +2709,59 @@
 <li class="listitem">
                 <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>
               </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
- </li>
 </ul></div>
 <p>
- Those predicates may be passed together in <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></code>
- or <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code></code>.
+ <span class="bold"><strong>Value predicate</strong></span>
+ </p>
+<p>
+ This is a special kind of predicate which allows to pass a user-defined
+ functor which checks if Value should be returned by the query. It's generated
+ by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Nearest predicate</strong></span>
+ </p>
+<p>
+ If the nearest predicate is passed a k-nearest neighbor search will be
+ performed. It has two variants. Passing the first one will result in
+ returning k number of values, the second one will result in returning
+ only one, closest value. In both cases values will be returned to the
+ output iterator. Only one nearest predicate may be passed to the query.
+ It may be generated by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">boost::geometry::index::nearest()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Connecting predicates</strong></span>
+ </p>
+<p>
+ A set of predicates may be generated by:
           </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;&amp;()</span></code></code>
+ </li>
+</ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">spatial_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">predicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -2683,8 +2769,8 @@
 <p>
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2718,12 +2804,12 @@
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">pred</span></code>
+ <code class="computeroutput"><span class="identifier">predicates</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The spatial predicates or a Geometry.
+ Predicates.
                     </p>
                   </td>
 </tr>
@@ -2740,111 +2826,167 @@
                   </td>
 <td>
                     <p>
- The output iterator of the result range. E.g. an iterator generated
- by std::back_inserter(container)
+ The output iterator, e.g. generated by std::back_inserter().
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.example">Example</a>
           </h6>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem">
- If Value copy constructor or copy assignment throws.
- </li>
-<li class="listitem">
- If OutIter dereference or increment throws.
- </li>
-</ul></div>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">box1</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">),</span> <span class="special">!</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">)),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">value</span><span class="special">(</span><span class="identifier">my_fun</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.h6"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____outiter_.throws">Throws</a>
+ </h6>
+<p>
+ If Value copy constructor or copy assignment throws.
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Only one <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ perdicate may be passed to the query.
+ </p></td></tr>
+</table></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___" title="nearest_query(DistancesPredicates const &amp;, value_type &amp;)">nearest_query(DistancesPredicates
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1abd965047110c9f8ef6ff097e97487312"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___" title="query(Predicates const &amp;, value_type &amp;)">query(Predicates
           const &amp;, value_type &amp;)</a>
 </h5></div></div></div>
 <p>
- Finds one value meeting distances predicates, e.g. nearest to some Point.
+ Finds value meeting passed predicates e.g. nearest to some Point and
+ intersecting some Box.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description">Description</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.description">Description</a>
           </h6>
 <p>
- <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
- Value closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
- is returned.
+ This query function performs k-nearest neighbor searches. It allows to
+ pass a set of predicates. The value will be returned only if all predicates
+ are met. This query requires that one of the predicates must be one-value
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate.
           </p>
 <p>
- It is possible to define how distance to Value is calculated. This is
- done by passing PointRelation. It can be generated by following functions:
+ <span class="bold"><strong>Spatial predicates</strong></span>
+ </p>
+<p>
+ The simplest form of spatial predicate is a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>.
+ In this case Values intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned. More spatial predicates may be generated by one of the
+ functions listed below:
           </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
                 - default,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
               </li>
 </ul></div>
 <p>
- It is possible to define define distances bounds, for example that some
- distance must be between min_distance and max_distance. This is done
- by passing DistancesPredicates which can be generated by following functions:
+ It is possible to negate spatial predicates:
           </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
- - default,
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>
               </li>
 </ul></div>
 <p>
- MinRelation and MaxRelation describes bounds and can be generated by
- following functions:
+ <span class="bold"><strong>Value predicate</strong></span>
+ </p>
+<p>
+ This is a special kind of predicate which allows to pass a user-defined
+ functor which checks if Value should be returned by the query. It's generated
+ by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Nearest predicate</strong></span>
+ </p>
+<p>
+ This query requires that one of the predicates must be one-value <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate. It may be generated by <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ taking only one parameter - distance predicates.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">boost::geometry::index::nearest()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Connecting predicates</strong></span>
+ </p>
+<p>
+ A set of predicates may be generated by:
           </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">()</span></code></code>
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">()</span></code></code>
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ <code class="literal"><code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;&amp;()</span></code></code>
               </li>
 </ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">predicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">value</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -2852,8 +2994,8 @@
 <p>
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -2882,18 +3024,17 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">DistancesPredicates</span>
- <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">dpred</span></code>
+ <code class="computeroutput"><span class="identifier">predicates</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The distances predicates or a Point.
+ Predicates.
                     </p>
                   </td>
 </tr>
@@ -2906,131 +3047,95 @@
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">v</span></code>
+ <code class="computeroutput"><span class="identifier">value</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The reference to the object which will contain the result.
+ The reference to value which will hold the result of the query.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.returns">Returns</a>
           </h6>
 <p>
- The number of values found.
+ The number of values found (1 if value was found, 0 otherwise).
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.example">Example</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">)),</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">),</span> <span class="identifier">value</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.h6"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.query_predicates_const____value_type___.throws">Throws</a>
           </h6>
 <p>
             If Value copy constructor or copy assignment throws.
           </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This query requires that one of the predicates must be one-value <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate.
+ </p></td></tr>
+</table></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___" title="nearest_query(DistancesPredicates const &amp;, Predicates const &amp;, value_type &amp;)">nearest_query(DistancesPredicates
- const &amp;, Predicates const &amp;, value_type &amp;)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a930bf17d595a91d8ae924383a0387920"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_" title="spatial_query(Predicates const &amp;, OutIter)">spatial_query(Predicates
+ const &amp;, OutIter)</a>
 </h5></div></div></div>
 <p>
- Finds one value meeting distances predicates and spatial predicates,
- e.g. nearest to some Point and intersecting some Box.
+ Finds values meeting spatial predicates, e.g. intersecting some Box.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description">Description</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
- <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
- Value closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
- is returned.
+ <span class="bold"><strong>Spatial predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>. In this case Values
+ intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned.
           </p>
 <p>
- It is possible to define how distance to Value is calculated. This is
- done by passing PointRelation. It can be generated by following functions:
+ It may be generated by one of the functions listed below:
           </p>
 <div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
- - default,
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
+ - default,
               </li>
-</ul></div>
-<p>
- It is possible to define define distances bounds, for example that some
- distance must be between min_distance and max_distance. This is done
- by passing DistancesPredicates which can be generated by following functions:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
- - default,
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
               </li>
 <li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
- </li>
-</ul></div>
-<p>
- MinRelation and MaxRelation describes bounds and can be generated by
- following functions:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
- </li>
-</ul></div>
-<p>
- <span class="bold"><strong>Spatial predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>. In this case Values
- intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
- are returned.
- </p>
-<p>
- It may be generated by one of the functions listed below:
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
- - default,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
- </li>
-<li class="listitem">
- <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
               </li>
 <li class="listitem">
                 <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>,
@@ -3050,17 +3155,15 @@
             or <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">spatial_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -3068,8 +3171,8 @@
 <p>
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3098,24 +3201,6 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">DistancesPredicates</span>
- <span class="keyword">const</span> <span class="special">&amp;</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">dpred</span></code>
- </p>
- </td>
-<td>
- <p>
- The distances predicates or a Point.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
                       <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
@@ -3126,57 +3211,61 @@
                   </td>
 <td>
                     <p>
- The spatial predicates or a Geometry
+ The spatial predicates or a Geometry.
                     </p>
                   </td>
 </tr>
 <tr>
 <td>
                     <p>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput">
- <span class="special">&amp;</span></code>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">v</span></code>
+ <code class="computeroutput"><span class="identifier">out_it</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The reference to the object which will contain the result.
+ The output iterator of the result range. E.g. an iterator generated
+ by std::back_inserter(container)
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.spatial_query_predicates_const____outiter_.throws">Throws</a>
           </h6>
-<p>
- If Value copy constructor or copy assignment throws.
- </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ If Value copy constructor or copy assignment throws.
+ </li>
+<li class="listitem">
+ If OutIter dereference or increment throws.
+ </li>
+</ul></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a3101652211c9f2d6ed8626dae6ff5f9d"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_" title="nearest_query(DistancesPredicates const &amp;, size_type, OutIter)">nearest_query(DistancesPredicates
- const &amp;, size_type, OutIter)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a788295b315bd0ddeb93b1cc050fdf909"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___" title="nearest_query(DistancesPredicates const &amp;, value_type &amp;)">nearest_query(DistancesPredicates
+ const &amp;, value_type &amp;)</a>
 </h5></div></div></div>
 <p>
- Finds k values meeting distances predicates, e.g. k nearest values to
- some Point.
+ Finds one value meeting distances predicates, e.g. nearest to some Point.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description">Description</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -3235,17 +3324,15 @@
               </li>
 </ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">k</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -3253,8 +3340,8 @@
 <p>
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3301,67 +3388,50 @@
 <tr>
 <td>
                     <p>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">k</span></code>
- </p>
- </td>
-<td>
- <p>
- The max number of values.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">OutIter</span></code>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput">
+ <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">out_it</span></code>
+ <code class="computeroutput"><span class="identifier">v</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The output iterator of the result range. E.g. a back_insert_iterator.
+ The reference to the object which will contain the result.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____value_type___.throws">Throws</a>
           </h6>
 <p>
- If Value copy constructor or copy assignment throws. If OutIter dereference
- or increment throws.
+ If Value copy constructor or copy assignment throws.
           </p>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a31c23b87b01f12282ef0df6404ab7301"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_" title="nearest_query(DistancesPredicates const &amp;, size_type, Predicates const &amp;, OutIter)">nearest_query(DistancesPredicates
- const &amp;, size_type, Predicates const &amp;, OutIter)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a6552331dca4d67647ef2a03bd0fbedcc"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___" title="nearest_query(DistancesPredicates const &amp;, Predicates const &amp;, value_type &amp;)">nearest_query(DistancesPredicates
+ const &amp;, Predicates const &amp;, value_type &amp;)</a>
 </h5></div></div></div>
 <p>
- Finds k values meeting distances predicates and spatial predicates, e.g.
- k nearest values to some Point and intersecting some Box.
+ Finds one value meeting distances predicates and spatial predicates,
+ e.g. nearest to some Point and intersecting some Box.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description">Description</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.description">Description</a>
           </h6>
 <p>
             <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
@@ -3468,20 +3538,17 @@
             or <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
 <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">k</span></code><code class="computeroutput"><span class="special">,</span></code>
                         <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput"> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -3489,8 +3556,8 @@
 <p>
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -3530,24 +3597,7 @@
                   </td>
 <td>
                     <p>
- The distances predicates or a Point
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">k</span></code>
- </p>
- </td>
-<td>
- <p>
- The max number of values.
+ The distances predicates or a Point.
                     </p>
                   </td>
 </tr>
@@ -3564,61 +3614,499 @@
                   </td>
 <td>
                     <p>
- The spatial predicates or a Geometry.
+ The spatial predicates or a Geometry
                     </p>
                   </td>
 </tr>
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">OutIter</span></code>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a9979db9ef37591985256cb8ad31862bb">value_type</a></code><code class="computeroutput">
+ <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">out_it</span></code>
+ <code class="computeroutput"><span class="identifier">v</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The output iterator of the result range. E.g. a back_insert_iterator.
+ The reference to the object which will contain the result.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h4"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.returns">Returns</a>
           </h6>
 <p>
             The number of values found.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h5"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws">Throws</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____predicates_const____value_type___.throws">Throws</a>
           </h6>
 <p>
- If Value copy constructor or copy assignment throws. If OutIter dereference
- or increment throws.
+ If Value copy constructor or copy assignment throws.
           </p>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__" title="size()">size()</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a3101652211c9f2d6ed8626dae6ff5f9d"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_" title="nearest_query(DistancesPredicates const &amp;, size_type, OutIter)">nearest_query(DistancesPredicates
+ const &amp;, size_type, OutIter)</a>
 </h5></div></div></div>
 <p>
- Returns the number of stored values.
+ Finds k values meeting distances predicates, e.g. k nearest values to
+ some Point.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis">Synopsis</a>
- </h6>
-<pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">size</span></code><code class="computeroutput"><span class="special">()</span></code>
-</pre>
-<h6>
-<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_">Modifier(s)</a>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.description">Description</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
+ Value closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
+ is returned.
+ </p>
+<p>
+ It is possible to define how distance to Value is calculated. This is
+ done by passing PointRelation. It can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<p>
+ It is possible to define define distances bounds, for example that some
+ distance must be between min_distance and max_distance. This is done
+ by passing DistancesPredicates which can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
+ </li>
+</ul></div>
+<p>
+ MinRelation and MaxRelation describes bounds and can be generated by
+ following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">k</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.modifier_s_">Modifier(s)</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">const</span></pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">DistancesPredicates</span>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">dpred</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The distances predicates or a Point.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">k</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The max number of values.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">out_it</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The output iterator of the result range. E.g. a back_insert_iterator.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.returns">Returns</a>
+ </h6>
+<p>
+ The number of values found.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__outiter_.throws">Throws</a>
+ </h6>
+<p>
+ If Value copy constructor or copy assignment throws. If OutIter dereference
+ or increment throws.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a31c23b87b01f12282ef0df6404ab7301"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_" title="nearest_query(DistancesPredicates const &amp;, size_type, Predicates const &amp;, OutIter)">nearest_query(DistancesPredicates
+ const &amp;, size_type, Predicates const &amp;, OutIter)</a>
+</h5></div></div></div>
+<p>
+ Finds k values meeting distances predicates and spatial predicates, e.g.
+ k nearest values to some Point and intersecting some Box.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.description">Description</a>
+ </h6>
+<p>
+ <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case the
+ Value closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
+ is returned.
+ </p>
+<p>
+ It is possible to define how distance to Value is calculated. This is
+ done by passing PointRelation. It can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<p>
+ It is possible to define define distances bounds, for example that some
+ distance must be between min_distance and max_distance. This is done
+ by passing DistancesPredicates which can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
+ </li>
+</ul></div>
+<p>
+ MinRelation and MaxRelation describes bounds and can be generated by
+ following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>Spatial predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>. In this case Values
+ intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned.
+ </p>
+<p>
+ It may be generated by one of the functions listed below:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
+ </li>
+</ul></div>
+<p>
+ Those predicates may be passed together in <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span></code></code>
+ or <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span></code></code>.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancesPredicates</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">nearest_query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancesPredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">k</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.modifier_s_">Modifier(s)</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="keyword">const</span></pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">DistancesPredicates</span>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">dpred</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The distances predicates or a Point
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">k</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The max number of values.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pred</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The spatial predicates or a Geometry.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">out_it</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The output iterator of the result range. E.g. a back_insert_iterator.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.returns">Returns</a>
+ </h6>
+<p>
+ The number of values found.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.nearest_query_distancespredicates_const____size_type__predicates_const____outiter_.throws">Throws</a>
+ </h6>
+<p>
+ If Value copy constructor or copy assignment throws. If OutIter dereference
+ or increment throws.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__"></a><a name="classboost_1_1geometry_1_1index_1_1rtree_1a89561a834563f2ed6fc782bad16143fd"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__" title="size()">size()</a>
+</h5></div></div></div>
+<p>
+ Returns the number of stored values.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5c1a657074c527ed65f858c1ab6b36e6">size_type</a></code> <code class="computeroutput"><span class="identifier">size</span></code><code class="computeroutput"><span class="special">()</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree.size__.modifier_s_">Modifier(s)</a>
           </h6>
 <p>
 </p>
@@ -4062,6 +4550,39 @@
 <tr>
 <td>
                   <p>
+ <a class="link" href="reference.html#group__rtree__functions_1ga86e0808522ef6682b72b310a3891b276"><code class="computeroutput"><span class="identifier">query</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span>
+ <span class="keyword">const</span> <span class="special">&amp;,</span>
+ <span class="identifier">Predicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;,</span> <span class="identifier">OutIter</span><span class="special">)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Finds values meeting passed predicates e.g. nearest to some Point
+ and/or intersecting some Box.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="reference.html#group__rtree__functions_1ga35b54dcaed4e4d5fb38e9ef4b78ee3c7"><code class="computeroutput"><span class="identifier">query</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span>
+ <span class="keyword">const</span> <span class="special">&amp;,</span>
+ <span class="identifier">Predicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;,</span> <span class="keyword">typename</span>
+ <span class="identifier">rtree</span><span class="special">&lt;...&gt;::</span><span class="identifier">value_type</span> <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Finds value meeting passed predicates e.g. nearest to some Point
+ and intersecting some Box.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                     <a class="link" href="reference.html#group__rtree__functions_1gadcec162d2391c2c9cc4215a5578d1721"><code class="computeroutput"><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span>
                     <span class="keyword">const</span> <span class="special">&amp;,</span>
                     <span class="identifier">Predicates</span> <span class="keyword">const</span>
@@ -4179,49 +4700,263 @@
 </tr>
 <tr>
 <td>
- <p>
- <a class="link" href="reference.html#group__rtree__functions_1ga73a9002187db81c57c71f9ec204d57e4"><code class="computeroutput"><span class="identifier">envelope</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span>
- <span class="keyword">const</span> <span class="special">&amp;)</span></code></a>
- </p>
- </td>
+ <p>
+ <a class="link" href="reference.html#group__rtree__functions_1ga73a9002187db81c57c71f9ec204d57e4"><code class="computeroutput"><span class="identifier">envelope</span><span class="special">(</span><span class="identifier">rtree</span><span class="special">&lt;...&gt;</span>
+ <span class="keyword">const</span> <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Get the box containing all stored values or an invalid box if
+ the index has no values.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___"></a><a name="group__rtree__functions_1gac0ac9ed0e01f7494a5a3059e75d3c5cc"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___" title="insert(rtree&lt;...&gt; &amp;, Value const &amp;)">insert(rtree&lt;...&gt;
+ &amp;, Value const &amp;)</a>
+</h5></div></div></div>
+<p>
+ Insert a value to the index.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description">Description</a>
+ </h6>
+<p>
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c">rtree::insert(value_type
+ const&amp;)</a></code>.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Value</span> <span
class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span>
+ <span class="identifier">Value</span><span class="special">,</span>
+ <span class="identifier">Options</span><span class="special">,</span>
+ <span class="identifier">Translator</span><span class="special">,</span>
+ <span class="identifier">Allocator</span> <span class="special">&gt;</span>
+ <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">tree</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The spatial index.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span>
+ <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">v</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The value which will be stored in the index.
+ </p>
+ </td>
+</tr>
+</tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_"></a><a name="group__rtree__functions_1gaf8f4fa09c12b96ace3bbb38823a9191b"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_" title="insert(rtree&lt;...&gt; &amp;, Iterator, Iterator)">insert(rtree&lt;...&gt;
+ &amp;, Iterator, Iterator)</a>
+</h5></div></div></div>
+<p>
+ Insert a range of values to the index.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description">Description</a>
+ </h6>
+<p>
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d">rtree::insert(Iterator,
+ Iterator)</a></code>.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span>
+ <span class="identifier">Value</span><span class="special">,</span>
+ <span class="identifier">Options</span><span class="special">,</span>
+ <span class="identifier">Translator</span><span class="special">,</span>
+ <span class="identifier">Allocator</span> <span class="special">&gt;</span>
+ <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">tree</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The spatial index.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">first</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The beginning of the range of values.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ </p>
+ </td>
 <td>
- <p>
- Get the box containing all stored values or an invalid box if
- the index has no values.
- </p>
- </td>
+ <p>
+ <code class="computeroutput"><span class="identifier">last</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The end of the range of values.
+ </p>
+ </td>
 </tr>
 </tbody>
 </table></div>
+</div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___"></a><a name="group__rtree__functions_1gac0ac9ed0e01f7494a5a3059e75d3c5cc"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___" title="insert(rtree&lt;...&gt; &amp;, Value const &amp;)">insert(rtree&lt;...&gt;
- &amp;, Value const &amp;)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___"></a><a name="group__rtree__functions_1ga97ec330c1c021a1ac2d896a488c2eb9c"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___" title="insert(rtree&lt;...&gt; &amp;, Range const &amp;)">insert(rtree&lt;...&gt;
+ &amp;, Range const &amp;)</a>
 </h5></div></div></div>
 <p>
- Insert a value to the index.
+ Insert a range of values to the index.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description">Description</a>
           </h6>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6d5bd81e46cb4ff89277c753133664c">rtree::insert(value_type
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2">rtree::insert(Range
             const&amp;)</a></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Value</span> <span
class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Range</span> <span
class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________value_const___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4272,18 +5007,18 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span>
+ <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span>
                       <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">v</span></code>
+ <code class="computeroutput"><span class="identifier">rng</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The value which will be stored in the index.
+ The range of values.
                     </p>
                   </td>
 </tr>
@@ -4292,36 +5027,37 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_"></a><a name="group__rtree__functions_1gaf8f4fa09c12b96ace3bbb38823a9191b"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_" title="insert(rtree&lt;...&gt; &amp;, Iterator, Iterator)">insert(rtree&lt;...&gt;
- &amp;, Iterator, Iterator)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___"></a><a name="group__rtree__functions_1gad40492a5b99c3eebbd51901574762527"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___" title="remove(rtree&lt;...&gt; &amp;, Value const &amp;)">remove(rtree&lt;...&gt;
+ &amp;, Value const &amp;)</a>
 </h5></div></div></div>
 <p>
- Insert a range of values to the index.
+ Remove a value from the container.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description">Description</a>
           </h6>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5263a3faac7b4f0090d4ad1d44cc540d">rtree::insert(Iterator,
- Iterator)</a></code>.
+ Remove a value from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method this function removes
+ only one value from the container.
+ </p>
+<p>
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a">rtree::remove(value_type
+ const&amp;)</a></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4372,70 +5108,69 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Iterator</span></code>
- </p>
- </td>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">first</span></code>
- </p>
- </td>
-<td>
- <p>
- The beginning of the range of values.
- </p>
- </td>
-</tr>
-<tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span>
+ <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">last</span></code>
+ <code class="computeroutput"><span class="identifier">v</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The end of the range of values.
+ The value which will be removed from the index.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns">Returns</a>
+ </h6>
+<p>
+ 1 if value was removed, 0 otherwise.
+ </p>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___"></a><a name="group__rtree__functions_1ga97ec330c1c021a1ac2d896a488c2eb9c"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___" title="insert(rtree&lt;...&gt; &amp;, Range const &amp;)">insert(rtree&lt;...&gt;
- &amp;, Range const &amp;)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_"></a><a name="group__rtree__functions_1ga0219361de8b15c539af3f9bd027938ce"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_" title="remove(rtree&lt;...&gt; &amp;, Iterator, Iterator)">remove(rtree&lt;...&gt;
+ &amp;, Iterator, Iterator)</a>
 </h5></div></div></div>
 <p>
- Insert a range of values to the index.
+ Remove a range of values from the container.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description">Description</a>
           </h6>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1abb624abd9268b41e815d40342b2634c2">rtree::insert(Range
- const&amp;)</a></code>.
+ Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it doesn't take iterators
+ pointing to values stored in this container. It removes values equal
+ to these passed as a range. Furthermore this function removes only one
+ value for each one passed in the range, not all equal values.
+ </p>
+<p>
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd">rtree::remove(Iterator,
+ Iterator)</a></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="keyword">void</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Range</span> <span
class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.insert_rtree_________range_const___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4486,57 +5221,82 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span>
- <span class="special">&amp;</span></code>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">rng</span></code>
+ <code class="computeroutput"><span class="identifier">first</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The range of values.
+ The beginning of the range of values.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">last</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The end of the range of values.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns">Returns</a>
+ </h6>
+<p>
+ The number of removed values.
+ </p>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___"></a><a name="group__rtree__functions_1gad40492a5b99c3eebbd51901574762527"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___" title="remove(rtree&lt;...&gt; &amp;, Value const &amp;)">remove(rtree&lt;...&gt;
- &amp;, Value const &amp;)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___"></a><a name="group__rtree__functions_1ga5885d6c90a91f238f72ab9b5ef24daf9"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___" title="remove(rtree&lt;...&gt; &amp;, Range const &amp;)">remove(rtree&lt;...&gt;
+ &amp;, Range const &amp;)</a>
 </h5></div></div></div>
 <p>
- Remove a value from the container.
+ Remove a range of values from the container.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description">Description</a>
           </h6>
 <p>
- Remove a value from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method this function removes
- only one value from the container.
+ Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it removes values
+ equal to these passed as a range. Furthermore this method removes only
+ one value for each one passed in the range, not all equal values.
           </p>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1af6ca6909354a997f89411ef40ea5688a">rtree::remove(value_type
+ It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c">rtree::remove(Range
             const&amp;)</a></code>.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">v</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4587,69 +5347,155 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Value</span> <span class="keyword">const</span>
+ <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span>
                       <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">v</span></code>
+ <code class="computeroutput"><span class="identifier">rng</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The value which will be removed from the index.
+ The range of values.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________value_const___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns">Returns</a>
+ </h6>
+<p>
+ The number of removed values.
+ </p>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_"></a><a name="group__rtree__functions_1ga86e0808522ef6682b72b310a3891b276"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_" title="query(rtree&lt;...&gt; const &amp;, Predicates const &amp;, OutIter)">query(rtree&lt;...&gt;
+ const &amp;, Predicates const &amp;, OutIter)</a>
+</h5></div></div></div>
+<p>
+ Finds values meeting passed predicates e.g. nearest to some Point and/or
+ intersecting some Box.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.description">Description</a>
           </h6>
 <p>
- 1 if value was removed, 0 otherwise.
+ This query function performs spatial and k-nearest neighbor searches.
+ It allows to pass a set of predicates. Values will be returned only if
+ all predicates are met.
+ </p>
+<p>
+ <span class="bold"><strong>Spatial predicates</strong></span>
+ </p>
+<p>
+ The simplest form of spatial predicate is a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>.
+ In this case Values intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned. More spatial predicates may be generated by one of the
+ functions listed below:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
+ </li>
+</ul></div>
+<p>
+ It is possible to negate spatial predicates:
           </p>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_"></a><a name="group__rtree__functions_1ga0219361de8b15c539af3f9bd027938ce"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_" title="remove(rtree&lt;...&gt; &amp;, Iterator, Iterator)">remove(rtree&lt;...&gt;
- &amp;, Iterator, Iterator)</a>
-</h5></div></div></div>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>
+ </li>
+</ul></div>
 <p>
- Remove a range of values from the container.
+ <span class="bold"><strong>Value predicate</strong></span>
           </p>
-<h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.description">Description</a>
- </h6>
 <p>
- Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it doesn't take iterators
- pointing to values stored in this container. It removes values equal
- to these passed as a range. Furthermore this function removes only one
- value for each one passed in the range, not all equal values.
+ This is a special kind of predicate which allows to pass a user-defined
+ functor which checks if Value should be returned by the query. It's generated
+ by:
           </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
+ </li></ul></div>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a6e9123114697d65b16ebc49cd5371fbd">rtree::remove(Iterator,
- Iterator)</a></code>.
+ <span class="bold"><strong>Nearest predicate</strong></span>
+ </p>
+<p>
+ If the nearest predicate is passed a k-nearest neighbor search will be
+ performed. It has two variants. Passing the first one will result in
+ returning k number of values, the second one will result in returning
+ only one, closest value. In both cases values will be returned to the
+ output iterator. Only one nearest predicate may be passed to the query.
+ It may be generated by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">boost::geometry::index::nearest()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Connecting predicates</strong></span>
           </p>
+<p>
+ A set of predicates may be generated by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;&amp;()</span></code></code>
+ </li>
+</ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Iterator</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">first</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="identifier">Iterator</span></code> <code class="computeroutput"><span class="identifier">last</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">OutIter</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</sp
an><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code> <code class="computeroutput"><span class="identifier">out_it</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4683,7 +5529,7 @@
                       <span class="identifier">Options</span><span class="special">,</span>
                       <span class="identifier">Translator</span><span class="special">,</span>
                       <span class="identifier">Allocator</span> <span class="special">&gt;</span>
- <span class="special">&amp;</span></code>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
@@ -4700,82 +5546,201 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">first</span></code>
+ <code class="computeroutput"><span class="identifier">predicates</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The beginning of the range of values.
+ Predicates.
                     </p>
                   </td>
 </tr>
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Iterator</span></code>
+ <code class="computeroutput"><span class="identifier">OutIter</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">last</span></code>
+ <code class="computeroutput"><span class="identifier">out_it</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The end of the range of values.
+ The output iterator, e.g. generated by std::back_inserter().
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________iterator__iterator_.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.returns">Returns</a>
           </h6>
 <p>
- The number of removed values.
+ The number of values found.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.example">Example</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">box1</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">),</span> <span class="special">!</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">)),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">value</span><span class="special">(</span><span class="identifier">my_fun</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____outiter_.throws">Throws</a>
+ </h6>
+<p>
+ If Value copy constructor or copy assignment throws.
           </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Only one <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ perdicate may be passed to the query.
+ </p></td></tr>
+</table></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___"></a><a name="group__rtree__functions_1ga5885d6c90a91f238f72ab9b5ef24daf9"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___" title="remove(rtree&lt;...&gt; &amp;, Range const &amp;)">remove(rtree&lt;...&gt;
- &amp;, Range const &amp;)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___"></a><a name="group__rtree__functions_1ga35b54dcaed4e4d5fb38e9ef4b78ee3c7"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___" title="query(rtree&lt;...&gt; const &amp;, Predicates const &amp;, typename rtree&lt;...&gt;::value_type &amp;)">query(rtree&lt;...&gt;
+ const &amp;, Predicates const &amp;, typename rtree&lt;...&gt;::value_type
+ &amp;)</a>
 </h5></div></div></div>
 <p>
- Remove a range of values from the container.
+ Finds value meeting passed predicates e.g. nearest to some Point and
+ intersecting some Box.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.description">Description</a>
           </h6>
 <p>
- Remove a range of values from the container. In contrast to the <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">set</span></code></code> or <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">map</span> <span class="identifier">erase</span><span class="special">()</span></code></code> method it removes values
- equal to these passed as a range. Furthermore this method removes only
- one value for each one passed in the range, not all equal values.
+ This query function performs k-nearest neighbor searches. It allows to
+ pass a set of predicates. The value will be returned only if all predicates
+ are met. This query requires that one of the predicates must be one-value
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate.
           </p>
 <p>
- It calls <code class="literal"><a class="link" href="reference.html#classboost_1_1geometry_1_1index_1_1rtree_1a5a57bb93b0b2d7ea1c659e925f918e9c">rtree::remove(Range
- const&amp;)</a></code>.
+ <span class="bold"><strong>Spatial predicates</strong></span>
+ </p>
+<p>
+ The simplest form of spatial predicate is a <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>.
+ In this case Values intersecting the <code class="literal"><code class="computeroutput"><span class="identifier">Geometry</span></code></code>
+ are returned. More spatial predicates may be generated by one of the
+ functions listed below:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>,
+ </li>
+</ul></div>
+<p>
+ It is possible to negate spatial predicates:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61">boost::geometry::index::covered_by()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga351bb3b82e019ff45adf789385b8007d">boost::geometry::index::disjoint()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga7301c50e0272976b9f1434536383e6d0">boost::geometry::index::intersects()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1ga5511236f56be1defcccbf11e742ccd88">boost::geometry::index::overlaps()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="special">!</span> </code><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">boost::geometry::index::within()</a></code>
+ </li>
+</ul></div>
+<p>
+ <span class="bold"><strong>Value predicate</strong></span>
+ </p>
+<p>
+ This is a special kind of predicate which allows to pass a user-defined
+ functor which checks if Value should be returned by the query. It's generated
+ by:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce">boost::geometry::index::value()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Nearest predicate</strong></span>
+ </p>
+<p>
+ This query requires that one of the predicates must be one-value <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate. It may be generated by <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ taking only one parameter - distance predicates.
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">boost::geometry::index::nearest()</a></code>.
+ </li></ul></div>
+<p>
+ <span class="bold"><strong>Connecting predicates</strong></span>
+ </p>
+<p>
+ A set of predicates may be generated by:
           </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">()</span></code></code>
+ </li>
+<li class="listitem">
+ <code class="literal"><code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;&amp;()</span></code></code>
+ </li>
+</ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.synopsis">Synopsis</a>
           </h6>
 <pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Value</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Options</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Translator</span></code><code class="computeroutput"><span class="special">,</span></code>
          <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Allocator</span></code><code class="computeroutput"><span class="special">,</span></code>
- <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Range</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</s
pan><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">rng</span></code><code class="computeroutput"><span class="special">)</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;::</span><span class="identifier">size_type</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</sp
an><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">tree</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">predicates</span></code><code class="computeroutput"><span class="special">,</span></code>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span> <span class="special">&gt;::</span><span class="identifier">value_type</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">value</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -4809,7 +5774,7 @@
                       <span class="identifier">Options</span><span class="special">,</span>
                       <span class="identifier">Translator</span><span class="special">,</span>
                       <span class="identifier">Allocator</span> <span class="special">&gt;</span>
- <span class="special">&amp;</span></code>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
@@ -4826,30 +5791,76 @@
 <tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Range</span> <span class="keyword">const</span>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">predicates</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Predicates.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">rtree</span><span class="special">&lt;</span> <span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Options</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span>
+ <span class="special">&gt;::</span><span class="identifier">value_type</span>
                       <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">rng</span></code>
+ <code class="computeroutput"><span class="identifier">value</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The range of values.
+ The reference to value which will hold the result of the query.
                     </p>
                   </td>
 </tr>
 </tbody>
 </table></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.remove_rtree_________range_const___.returns">Returns</a>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.returns"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.returns">Returns</a>
           </h6>
 <p>
- The number of removed values.
+ The number of values found (1 if value was found, 0 otherwise).
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h4"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.example">Example</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">)),</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">bgi</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">tree</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">poly</span><span class="special">),</span> <span class="identifier">value</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.h5"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.throws"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__rtree__functions.query_rtree______const____predicates_const____typename_rtree_______value_type___.throws">Throws</a>
+ </h6>
+<p>
+ If Value copy constructor or copy assignment throws.
           </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ This query requires that one of the predicates must be one-value <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate.
+ </p></td></tr>
+</table></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
@@ -5902,7 +6913,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_linear"></a><a name="structboost_1_1geometry_1_1index_1_1linear"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_linear" title="boost::geometry::index::linear">boost::geometry::index::linear</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id924517"></a><a class="indexterm" name="id924521"></a><a class="indexterm" name="id924526"></a><a class="indexterm" name="id924531"></a>
+ <a class="indexterm" name="id939010"></a><a class="indexterm" name="id939015"></a><a class="indexterm" name="id939020"></a><a class="indexterm" name="id939024"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -5977,7 +6988,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic"></a><a name="structboost_1_1geometry_1_1index_1_1quadratic"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_quadratic" title="boost::geometry::index::quadratic">boost::geometry::index::quadratic</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id924825"></a><a class="indexterm" name="id924830"></a><a class="indexterm" name="id924835"></a><a class="indexterm" name="id924839"></a>
+ <a class="indexterm" name="id939318"></a><a class="indexterm" name="id939323"></a><a class="indexterm" name="id939328"></a><a class="indexterm" name="id939333"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6052,7 +7063,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar"></a><a name="structboost_1_1geometry_1_1index_1_1rstar"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_rstar" title="boost::geometry::index::rstar">boost::geometry::index::rstar</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id925133"></a><a class="indexterm" name="id925138"></a><a class="indexterm" name="id925143"></a><a class="indexterm" name="id925148"></a>
+ <a class="indexterm" name="id939627"></a><a class="indexterm" name="id939632"></a><a class="indexterm" name="id939636"></a><a class="indexterm" name="id939641"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6156,7 +7167,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1linear"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_linear" title="boost::geometry::index::runtime::linear">boost::geometry::index::runtime::linear</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id925568"></a><a class="indexterm" name="id925573"></a><a class="indexterm" name="id925577"></a><a class="indexterm" name="id925582"></a><a class="indexterm" name="id925587"></a>
+ <a class="indexterm" name="id941359"></a><a class="indexterm" name="id941364"></a><a class="indexterm" name="id941368"></a><a class="indexterm" name="id941373"></a><a class="indexterm" name="id941378"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6292,7 +7303,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1quadratic"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_quadratic" title="boost::geometry::index::runtime::quadratic">boost::geometry::index::runtime::quadratic</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id926045"></a><a class="indexterm" name="id926050"></a><a class="indexterm" name="id926055"></a><a class="indexterm" name="id926060"></a><a class="indexterm" name="id926065"></a>
+ <a class="indexterm" name="id941836"></a><a class="indexterm" name="id941841"></a><a class="indexterm" name="id941846"></a><a class="indexterm" name="id941851"></a><a class="indexterm" name="id941856"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6428,7 +7439,7 @@
 <a name="geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar"></a><a name="classboost_1_1geometry_1_1index_1_1runtime_1_1rstar"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.parameters.boost_geometry_index_runtime_rstar" title="boost::geometry::index::runtime::rstar">boost::geometry::index::runtime::rstar</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id928303"></a><a class="indexterm" name="id928308"></a><a class="indexterm" name="id928313"></a><a class="indexterm" name="id928318"></a><a class="indexterm" name="id928322"></a>
+ <a class="indexterm" name="id942314"></a><a class="indexterm" name="id942319"></a><a class="indexterm" name="id942324"></a><a class="indexterm" name="id942328"></a><a class="indexterm" name="id942333"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6601,8 +7612,8 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.reference.group__predicates"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates" title="Spatial predicates (boost::geometry::index::)">Spatial
- predicates (boost::geometry::index::)</a>
+<a name="geometry_index.r_tree.reference.group__predicates"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates" title="Predicates (boost::geometry::index::)">Predicates
+ (boost::geometry::index::)</a>
 </h4></div></div></div>
 <h6>
 <a name="geometry_index.r_tree.reference.group__predicates.h0"></a>
@@ -6685,27 +7696,53 @@
 <tr>
 <td>
                   <p>
- <a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d"><code class="computeroutput"><span class="identifier">within</span><span class="special">(</span><span class="identifier">Geometry</span> <span class="keyword">const</span>
- <span class="special">&amp;)</span></code></a>
+ <a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d"><code class="computeroutput"><span class="identifier">within</span><span class="special">(</span><span class="identifier">Geometry</span> <span class="keyword">const</span>
+ <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">within()</a></code>
+ predicate.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce"><code class="computeroutput"><span class="identifier">value</span><span class="special">(</span><span class="identifier">Fun</span> <span class="keyword">const</span>
+ <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ Generate value predicate.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
+ <a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b"><code class="computeroutput"><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">DistancePredicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;,</span> <span class="keyword">unsigned</span><span class="special">)</span></code></a>
                   </p>
                 </td>
 <td>
                   <p>
- Generate <code class="literal"><a class="link" href="reference.html#group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d">within()</a></code>
- predicate.
+ Generate nearest predicate.
                   </p>
                 </td>
 </tr>
 <tr>
 <td>
                   <p>
- <a class="link" href="reference.html#group__predicates_1ga8acb81106fce01da72f310184ab4d9ce"><code class="computeroutput"><span class="identifier">value</span><span class="special">(</span><span class="identifier">Fun</span> <span class="keyword">const</span>
+ <a class="link" href="reference.html#group__predicates_1ga54f507955e8dba2c928d6592d5970638"><code class="computeroutput"><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">DistancePredicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
                   </p>
                 </td>
 <td>
                   <p>
- Generate value predicate.
+ Generate nearest predicate.
                   </p>
                 </td>
 </tr>
@@ -7156,23 +8193,295 @@
 <a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h1"></a>
             <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">within</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Geometry</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">within</span><span class="special">&lt;</span><span class="identifier">Geometry</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">g</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_">Template
+ parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Geometry</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The Geometry type.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span>
+ <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">g</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The Geometry object.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___"></a><a name="group__predicates_1ga8acb81106fce01da72f310184ab4d9ce"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___" title="value(Fun const &amp;)">value(Fun
+ const &amp;)</a>
+</h5></div></div></div>
+<p>
+ Generate value predicate.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.description">Description</a>
+ </h6>
+<p>
+ A wrapper around user-defined functor describing if Value should be returned
+ by spatial query.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Fun</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">value</span><span class="special">&lt;</span><span class="identifier">Fun</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Fun</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">fun</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.template_parameter_s_">Template
+ parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Parameter
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Fun</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Functor type.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Fun</span> <span class="keyword">const</span>
+ <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">fun</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ The functor.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_"></a><a name="group__predicates_1ga162233fd11b980853f8b8335cb70d57b"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_" title="nearest(DistancePredicates const &amp;, unsigned)">nearest(DistancePredicates
+ const &amp;, unsigned)</a>
+</h5></div></div></div>
+<p>
+ Generate nearest predicate.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.description">Description</a>
+ </h6>
+<p>
+ When nearest predicate is passed to the query, k-nearest neighbour search
+ will be performed.
+ </p>
+<p>
+ <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case values
+ closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
+ are returned.
+ </p>
+<p>
+ It is possible to define how distance between values and query Point
+ is calculated. This is done by passing PointRelation. It can be generated
+ by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<p>
+ It is possible to define distances bounds, for example that a distance
+ must be between min_distance and max_distance. This is done by passing
+ DistancesPredicates which can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
+ </li>
+</ul></div>
+<p>
+ MinRelation and MaxRelation describes bounds and can be generated by
+ following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancePredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">&lt;</span><span class="identifier">DistancePredicates</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancePredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">,</span></code> <code class="computeroutput"><span class="keyword">unsigned</span></code> <code class="computeroutput"><span class="identifier">k</span></code><code cla
ss="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.template_parameter_s_">Template
- parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
 <col>
 <col>
+<col>
 </colgroup>
 <thead><tr>
 <th>
                     <p>
- Parameter
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
                     </p>
                   </th>
 <th>
@@ -7181,127 +8490,152 @@
                     </p>
                   </th>
 </tr></thead>
-<tbody><tr>
+<tbody>
+<tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Geometry</span></code>
+ <code class="computeroutput"><span class="identifier">DistancePredicates</span>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The Geometry type.
+ <code class="computeroutput"><span class="identifier">dpred</span></code>
                     </p>
                   </td>
-</tr></tbody>
-</table></div>
-<h6>
-<a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.within_geometry_const___.parameter_s_">Parameter(s)</a>
- </h6>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Type
- </p>
- </th>
-<th>
- <p>
- Name
- </p>
- </th>
-<th>
+<td>
                     <p>
- Description
+ The distance predicates.
                     </p>
- </th>
-</tr></thead>
-<tbody><tr>
+ </td>
+</tr>
+<tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Geometry</span> <span class="keyword">const</span>
- <span class="special">&amp;</span></code>
+ <code class="computeroutput"><span class="keyword">unsigned</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">g</span></code>
+ <code class="computeroutput"><span class="identifier">k</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The Geometry object.
+ The maximum number of values to return.
                     </p>
                   </td>
-</tr></tbody>
+</tr>
+</tbody>
+</table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const____unsigned_.example">Example</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">5</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">5</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="number">5</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">10</span><span class="special">),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">20</span><span class="special">)),</span> <span class="number">5</span><span class="special">),</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">
back_inserter</span><span class="special">(</span><span class="identifier">result</span><span class="special">));</span>
+</pre>
+<p>
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Only one <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate may be used in a query. This version may be used only in
+ queries returning a set of values - using output iterator.
+ </p></td></tr>
 </table></div>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
-<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___"></a><a name="group__predicates_1ga8acb81106fce01da72f310184ab4d9ce"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___" title="value(Fun const &amp;)">value(Fun
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___"></a><a name="group__predicates_1ga54f507955e8dba2c928d6592d5970638"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___" title="nearest(DistancePredicates const &amp;)">nearest(DistancePredicates
           const &amp;)</a>
 </h5></div></div></div>
 <p>
- Generate value predicate.
+ Generate nearest predicate.
           </p>
 <h6>
-<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h0"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.description">Description</a>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.description"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.description">Description</a>
           </h6>
 <p>
- A wrapper around user-defined functor describing if Value should be returned
- by spatial query.
+ When nearest predicate is passed to the query, k-nearest neighbour search
+ will be performed.
+ </p>
+<p>
+ <span class="bold"><strong>Distances predicates</strong></span> may be a <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>. In this the case value
+ closest to <code class="literal"><code class="computeroutput"><span class="identifier">Point</span></code></code>
+ is returned.
+ </p>
+<p>
+ It is possible to define how distance between value and query Point is
+ calculated. This is done by passing PointRelation. It can be generated
+ by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
+<p>
+ It is possible to define distances bounds, for example that a distance
+ must be between min_distance and max_distance. This is done by passing
+ DistancesPredicates which can be generated by following functions:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga1b0f969b575a94ca710b9345861f64db">boost::geometry::index::unbounded()</a></code>
+ - default,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga39c7c94776ab840e164848e53d376098">boost::geometry::index::min_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga843735643378288b0e14e19cc9b4e079">boost::geometry::index::max_bounded()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga20621ca608b1420c38182346b965f347">boost::geometry::index::bounded()</a></code>.
+ </li>
+</ul></div>
+<p>
+ MinRelation and MaxRelation describes bounds and can be generated by
+ following functions:
           </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">boost::geometry::index::to_nearest()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">boost::geometry::index::to_centroid()</a></code>,
+ </li>
+<li class="listitem">
+ <code class="literal"><a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">boost::geometry::index::to_furthest()</a></code>.
+ </li>
+</ul></div>
 <h6>
-<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h1"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.synopsis">Synopsis</a>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.synopsis">Synopsis</a>
           </h6>
-<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Fun</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
-<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">value</span><span class="special">&lt;</span><span class="identifier">Fun</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Fun</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">fun</span></code><code class="computeroutput"><span class="special">)</span></code>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">DistancePredicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">nearest_one</span><span class="special">&lt;</span><span class="identifier">DistancePredicates</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">DistancePredicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">dpred</span></code><code class="computeroutput"><span class="special">)</span></code>
 </pre>
 <h6>
-<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h2"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.template_parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.template_parameter_s_">Template
- parameter(s)</a>
- </h6>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Parameter
- </p>
- </th>
-<th>
- <p>
- Description
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <code class="computeroutput"><span class="identifier">Fun</span></code>
- </p>
- </td>
-<td>
- <p>
- Functor type.
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<h6>
-<a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.h3"></a>
- <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.value_fun_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.value_fun_const___.parameter_s_">Parameter(s)</a>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.h2"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.parameter_s_">Parameter(s)</a>
           </h6>
 <div class="informaltable"><table class="table">
 <colgroup>
@@ -7329,22 +8663,46 @@
 <tbody><tr>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">Fun</span> <span class="keyword">const</span>
- <span class="special">&amp;</span></code>
+ <code class="computeroutput"><span class="identifier">DistancePredicates</span>
+ <span class="keyword">const</span> <span class="special">&amp;</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- <code class="computeroutput"><span class="identifier">fun</span></code>
+ <code class="computeroutput"><span class="identifier">dpred</span></code>
                     </p>
                   </td>
 <td>
                     <p>
- The functor.
+ The distance predicates.
                     </p>
                   </td>
 </tr></tbody>
 </table></div>
+<h6>
+<a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.h3"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.example"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__predicates.nearest_distancepredicates_const___.example">Example</a>
+ </h6>
+<p>
+</p>
+<pre class="programlisting"><span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">pt</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="identifier">pt</span><span class="special">))</span> <span class="special">&amp;&amp;</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box</span><span class="special">),</span> <span class="identifier">value</span><span class="special">);</span>
+<span class="identifier">tree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">bgi</span><span class="special">::</span><span class="identifier">bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">10</span><span class="special">),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">20</span><span class="special">))),</span> <span class="identifier">value</span><span class="special">);</span>
+</pre>
+<p>
+ </p>
+<div class="warning"><table border="0" summary="Warning">
+<tr>
+<td rowspan="2" align="center" valign="top" width="25"><img alt="[Warning]" src="http://www.boost.org/doc/libs/release/doc/src/images/warning.png"></td>
+<th align="left">Warning</th>
+</tr>
+<tr><td align="left" valign="top"><p>
+ Only one <code class="literal"><a class="link" href="reference.html#group__predicates_1ga162233fd11b980853f8b8335cb70d57b">nearest()</a></code>
+ predicate may be used in a query. This version may be used only in
+ queries returning one value.
+ </p></td></tr>
+</table></div>
 </div>
 </div>
 <div class="section">
@@ -7384,7 +8742,7 @@
 <td>
                   <p>
                     Generate <a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">to_nearest()</a>
- Point-Indexable relationship.
+ relationship.
                   </p>
                 </td>
 </tr>
@@ -7398,7 +8756,7 @@
 <td>
                   <p>
                     Generate <a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">to_centroid()</a>
- Point-Indexable relationship.
+ relationship.
                   </p>
                 </td>
 </tr>
@@ -7412,7 +8770,7 @@
 <td>
                   <p>
                     Generate <a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">to_furthest()</a>
- Point-Indexable relationship.
+ relationship.
                   </p>
                 </td>
 </tr>
@@ -7486,7 +8844,7 @@
 </h5></div></div></div>
 <p>
             Generate <a class="link" href="reference.html#group__distance__predicates_1gace3c7dbc60840c2a61da36e975d56636">to_nearest()</a>
- Point-Indexable relationship.
+ relationship.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_nearest_t_const___.h0"></a>
@@ -7539,7 +8897,7 @@
 <td>
                     <p>
                       Type of wrapped object. This may be a Point for PointRelation
- or some Value for MinRelation or MaxRelation
+ or CoordinateType for MinRelation or MaxRelation
                     </p>
                   </td>
 </tr></tbody>
@@ -7585,7 +8943,7 @@
                   </td>
 <td>
                     <p>
- Point or bound value.
+ Point or distance value.
                     </p>
                   </td>
 </tr></tbody>
@@ -7598,7 +8956,7 @@
 </h5></div></div></div>
 <p>
             Generate <a class="link" href="reference.html#group__distance__predicates_1gaccbba95d864d8dcf8a694796c840fbe0">to_centroid()</a>
- Point-Indexable relationship.
+ relationship.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_centroid_t_const___.h0"></a>
@@ -7649,7 +9007,7 @@
 <td>
                     <p>
                       Type of wrapped object. This may be a Point for PointRelation
- or some Value for MinRelation or MaxRelation
+ or some CoordinateType for MinRelation or MaxRelation
                     </p>
                   </td>
 </tr></tbody>
@@ -7695,7 +9053,7 @@
                   </td>
 <td>
                     <p>
- Point or bound value.
+ Point or distance value.
                     </p>
                   </td>
 </tr></tbody>
@@ -7708,7 +9066,7 @@
 </h5></div></div></div>
 <p>
             Generate <a class="link" href="reference.html#group__distance__predicates_1ga67dddd8a7fcaae150970e1db0401de02">to_furthest()</a>
- Point-Indexable relationship.
+ relationship.
           </p>
 <h6>
 <a name="geometry_index.r_tree.reference.group__distance__predicates.to_furthest_t_const___.h0"></a>
@@ -7761,7 +9119,7 @@
 <td>
                     <p>
                       Type of wrapped object. This may be a Point for PointRelation
- or some Value for MinRelation or MaxRelation
+ or some CoordinateType for MinRelation or MaxRelation
                     </p>
                   </td>
 </tr></tbody>
@@ -7807,7 +9165,7 @@
                   </td>
 <td>
                     <p>
- Point or bound value.
+ Point or distance value.
                     </p>
                   </td>
 </tr></tbody>
@@ -8470,6 +9828,19 @@
 <tr>
 <td>
                   <p>
+ <a class="link" href="reference.html#group__adaptors_1ga4716cd5423bfed3ff3e69e9ec274ac81"><code class="computeroutput"><span class="identifier">queried</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
+ <span class="special">&amp;)</span></code></a>
+ </p>
+ </td>
+<td>
+ <p>
+ The query index adaptor generator.
+ </p>
+ </td>
+</tr>
+<tr>
+<td>
+ <p>
                     <a class="link" href="reference.html#group__adaptors_1ga3068771f0f9cca706269ec35a809db2a"><code class="computeroutput"><span class="identifier">spatial_queried</span><span class="special">(</span><span class="identifier">Predicates</span> <span class="keyword">const</span>
                     <span class="special">&amp;)</span></code></a>
                   </p>
@@ -8665,6 +10036,67 @@
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___"></a><a name="group__adaptors_1ga4716cd5423bfed3ff3e69e9ec274ac81"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___" title="queried(Predicates const &amp;)">queried(Predicates
+ const &amp;)</a>
+</h5></div></div></div>
+<p>
+ The query index adaptor generator.
+ </p>
+<h6>
+<a name="geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.h0"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.synopsis"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.synopsis">Synopsis</a>
+ </h6>
+<pre class="programlisting"><code class="computeroutput"><span class="keyword">template</span><span class="special">&lt;</span></code><code class="computeroutput"><span class="keyword">typename</span> <span class="identifier">Predicates</span></code><code class="computeroutput"><span class="special">&gt;</span></code>
+<code class="computeroutput"><span class="identifier">detail</span><span class="special">::</span><span class="identifier">query</span><span class="special">&lt;</span><span class="identifier">Predicates</span><span class="special">&gt;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">queried</span></code><code class="computeroutput"><span class="special">(</span></code><code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code> <code class="computeroutput"><span class="identifier">pred</span></code><code class="computeroutput"><span class="special">)</span></code>
+</pre>
+<h6>
+<a name="geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.h1"></a>
+ <span class="phrase"><a name="geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.parameter_s_"></a></span><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.queried_predicates_const___.parameter_s_">Parameter(s)</a>
+ </h6>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Type
+ </p>
+ </th>
+<th>
+ <p>
+ Name
+ </p>
+ </th>
+<th>
+ <p>
+ Description
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">Predicates</span> <span class="keyword">const</span> <span class="special">&amp;</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ <code class="computeroutput"><span class="identifier">pred</span></code>
+ </p>
+ </td>
+<td>
+ <p>
+ Predicates.
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
 <a name="geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___"></a><a name="group__adaptors_1ga3068771f0f9cca706269ec35a809db2a"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.group__adaptors.spatial_queried_predicates_const___" title="spatial_queried(Predicates const &amp;)">spatial_queried(Predicates
           const &amp;)</a>
 </h5></div></div></div>
@@ -8735,7 +10167,7 @@
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def"></a><a name="structboost_1_1geometry_1_1index_1_1translator_1_1def"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_def" title="boost::geometry::index::translator::def">boost::geometry::index::translator::def</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id940233"></a><a class="indexterm" name="id940238"></a><a class="indexterm" name="id940242"></a><a class="indexterm" name="id940247"></a><a class="indexterm" name="id940252"></a>
+ <a class="indexterm" name="id958209"></a><a class="indexterm" name="id958214"></a><a class="indexterm" name="id958219"></a><a class="indexterm" name="id958224"></a><a class="indexterm" name="id958228"></a>
 The default translator.
           </p>
 <h6>
@@ -8805,7 +10237,7 @@
 <a name="geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index"></a><a name="classboost_1_1geometry_1_1index_1_1translator_1_1index"></a><a class="link" href="reference.html#geometry_index.r_tree.reference.translators.boost_geometry_index_translator_index" title="boost::geometry::index::translator::index">boost::geometry::index::translator::index</a>
 </h5></div></div></div>
 <p>
- <a class="indexterm" name="id940721"></a><a class="indexterm" name="id940726"></a><a class="indexterm" name="id940731"></a><a class="indexterm" name="id940736"></a><a class="indexterm" name="id940741"></a>
+ <a class="indexterm" name="id958492"></a><a class="indexterm" name="id958497"></a><a class="indexterm" name="id958502"></a><a class="indexterm" name="id958507"></a><a class="indexterm" name="id958512"></a>
 The index translator.
           </p>
 <h6>

Modified: sandbox-branches/geometry/index/doc/html/index.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/index.html (original)
+++ sandbox-branches/geometry/index/doc/html/index.html 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
@@ -52,7 +52,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: January 24, 2013 at 13:47:55 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 26, 2013 at 00:31:44 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Deleted: sandbox-branches/geometry/index/tests/query_expr.cpp
==============================================================================
--- sandbox-branches/geometry/index/tests/query_expr.cpp 2013-01-25 19:36:29 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,223 +0,0 @@
-// Boost.Geometry Index
-// Additional tests
-
-// Copyright (c) 2011-2013 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
-// http://www.boost.org/LICENSE_1_0.txt)
-
-#include <boost/geometry/index/query_expr.hpp>
-
-#include <boost/timer.hpp>
-#include <fstream>
-#include <iostream>
-
-template <typename T>
-struct Test
-{
- inline Test(T const& t) : v(t) {}
- T v;
-};
-
-template <typename T1, typename T2, typename T3>
-struct Raw
-{
- inline explicit Raw(T1 const& t1, T2 const& t2, T3 const& t3) : v1(t1), v2(t2), v3(t3) {}
- T1 v1;
- T2 v2;
- T3 v3;
-};
-
-template <typename T1, typename T2> inline
-boost::tuples::cons<
- Test<T2>,
- boost::tuples::cons<Test<T1>, boost::tuples::null_type>
->
-operator&&(Test<T1> const& t1, Test<T2> const& t2)
-{
- return
- boost::tuples::cons<
- Test<T2>,
- boost::tuples::cons<Test<T1>, boost::tuples::null_type>
- >(t2,
- boost::tuples::cons<Test<T1>, boost::tuples::null_type>(t1, boost::tuples::null_type())
- );
-}
-
-template <typename H, typename T, typename T2> inline
-boost::tuples::cons<
- Test<T2>,
- boost::tuples::cons<H, T>
->
-operator&&(boost::tuples::cons<H, T> const& t, Test<T2> const& t2)
-{
- return
- boost::tuples::cons<
- Test<T2>,
- boost::tuples::cons<H, T>
- >(t2, t);
-}
-
-template <typename T>
-struct Test2
-{
- inline Test2(T const& t) : v(t) {}
- T v;
-};
-
-template <typename T1, typename T2> inline
-boost::tuples::cons<
- Test2<T1>,
- boost::tuples::cons<Test2<T2>, boost::tuples::null_type>
->
-operator&&(Test2<T1> const& t1, Test2<T2> const& t2)
-{
- return
- boost::tuples::cons<
- Test2<T1>,
- boost::tuples::cons<Test2<T2>, boost::tuples::null_type>
- >(t1,
- boost::tuples::cons<Test2<T2>, boost::tuples::null_type>(t2, boost::tuples::null_type())
- );
-}
-
-template <typename T, typename Tuple, size_t I, size_t N>
-struct add
-{
- typedef
- boost::tuples::cons<
- typename boost::tuples::element<I, Tuple>::type,
- typename add<T, Tuple, I+1, N>::type
- > type;
-
- static type apply(T const& t, Tuple const& tup)
- {
- return
- type(
- boost::get<I>(tup),
- add<T, Tuple, I+1, N>::apply(t, tup)
- );
- }
-};
-
-template <typename T, typename Tuple, size_t I>
-struct add<T, Tuple, I, I>
-{
- typedef boost::tuples::cons<T, boost::tuples::null_type> type;
-
- static type apply(T const& t, Tuple const&)
- {
- return type(t, boost::tuples::null_type());
- }
-};
-
-template <typename H, typename T, typename T2> inline
-typename add<
- Test2<T2>,
- boost::tuples::cons<H, T>,
- 0,
- boost::tuples::length<boost::tuples::cons<H, T> >::value
->::type
-operator&&(boost::tuples::cons<H, T> const& t, Test2<T2> const& t2)
-{
- return
- add<
- Test2<T2>,
- boost::tuples::cons<H, T>,
- 0,
- boost::tuples::length<boost::tuples::cons<H, T> >::value
- >::apply(t2, t);
-}
-
-template <typename T> inline
-double test(T const& t)
-{
- return boost::get<0>(t).v + boost::get<1>(t).v + boost::get<2>(t).v;
-}
-
-template <typename T> inline
-void test2(T const& t)
-{
- using namespace boost::geometry::index::qe;
- std::cout << detail::find_nearest_impl<T, 0, 3>::value << '\n';
-}
-
-int main()
-{
- using namespace boost::geometry::index::qe;
-
- //TEST
-
- test2(intersects(0) && nearest(0, 0) && intersects(0));
-
- boost::timer tim;
-
- size_t count = 200000000;
- //size_t count = 2000000;
- int dummy = 0;
- std::ifstream f("blablabla");
- f >> dummy;
-
- std::cout << "&&1 &&2 b, r,\n";
-
- double sum1 = 0, sum2 = 0, sum3 = 0, sum4 = 0;
- for(size_t i = 0 ; i < 20; ++i)
- {
- double foo = 0;
-
- {
- tim.restart();
- for ( size_t i = 0 ; i < count ; ++i )
- {
- foo += test(Test<int>(dummy) && Test<double>(dummy) && Test<float>(dummy));
- }
- double t = tim.elapsed();
- sum1 += t;
- std::cout << t << ' ';
- }
-
- {
- tim.restart();
- for ( size_t i = 0 ; i < count ; ++i )
- {
- foo += test(Test2<int>(dummy) && Test2<double>(dummy) && Test2<float>(dummy));
- }
- double t = tim.elapsed();
- sum2 += t;
- std::cout << t << ' ';
- }
-
- {
- tim.restart();
- for ( size_t i = 0 ; i < count ; ++i )
- {
- boost::tuple<Test<int>, Test<double>, Test<float> > tup
- = boost::make_tuple(Test<int>(dummy), Test<double>(dummy), Test<float>(dummy));
- foo += boost::get<0>(tup).v + boost::get<1>(tup).v + boost::get<2>(tup).v;
- }
- double t = tim.elapsed();
- sum3 += t;
- std::cout << t << ' ';
- }
-
- {
- tim.restart();
- for ( size_t i = 0 ; i < count ; ++i )
- {
- Raw<Test<int>, Test<double>, Test<float> > tup(dummy, dummy, dummy);
- foo += tup.v1.v + tup.v2.v + tup.v3.v;
- }
- double t = tim.elapsed();
- sum4 += t;
- std::cout << t << ' ';
- }
-
- std::cout << foo << '\n';
- }
-
- std::cout << "sums:\n";
- std::cout << sum1 << " " << sum2 << " " << sum3 << " " << sum4;
-
- return 0;
-}


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