Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82618 - in sandbox-branches/geometry/index/doc: . html html/geometry_index html/geometry_index/r_tree rtree src/examples/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-01-25 20:28:01


Author: awulkiew
Date: 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
New Revision: 82618
URL: http://svn.boost.org/trac/boost/changeset/82618

Log:
Docs updated - new querying method used.
Queries description rearranged/modified.

Added:
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/queries.html (contents, props changed)
   sandbox-branches/geometry/index/doc/rtree/query.qbk (contents, props changed)
Removed:
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html
   sandbox-branches/geometry/index/doc/rtree/nearest_query.qbk
   sandbox-branches/geometry/index/doc/rtree/spatial_query.qbk
Text files modified:
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree.html | 30 ++++++++++--------------------
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html | 6 +++---
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/reference.html | 24 ++++++++++++------------
   sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html | 4 ++--
   sandbox-branches/geometry/index/doc/html/index.html | 6 ++----
   sandbox-branches/geometry/index/doc/rtree.qbk | 4 +---
   sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp | 4 ++--
   7 files changed, 32 insertions(+), 46 deletions(-)

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 20:27:59 EST (Fri, 25 Jan 2013)
@@ -49,31 +49,21 @@
 <dt><span class="section"><a href="r_tree/creation_and_modification.html#geometry_index.r_tree.creation_and_modification.insert_iterator">Insert
         iterator</a></span></dt>
 </dl></dd>
-<dt><span class="section">Spatial queries</span></dt>
+<dt><span class="section">Queries</span></dt>
 <dd><dl>
-<dt><span class="section"><a href="r_tree/spatial_queries.html#geometry_index.r_tree.spatial_queries.basic_queries">Basic
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.performing_a_query">Performing
+ a query</a></span></dt>
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.spatial_queries">Spatial
         queries</a></span></dt>
-<dt><span class="section"><a href="r_tree/spatial_queries.html#geometry_index.r_tree.spatial_queries.spatial_predicates">Spatial
- predicates</a></span></dt>
-<dt><span class="section"><a href="r_tree/spatial_queries.html#geometry_index.r_tree.spatial_queries.connecting_predicates">Connecting
- predicates</a></span></dt>
-<dt><span class="section"><a href="r_tree/spatial_queries.html#geometry_index.r_tree.spatial_queries.value_predicate">Value
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries">Nearest
+ neighbours queries</a></span></dt>
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.value_predicate">Value
         predicate</a></span></dt>
-<dt><span class="section"><a href="r_tree/spatial_queries.html#geometry_index.r_tree.spatial_queries.inserting_query_results_into_the_other_r_tree">Inserting
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.passing_a_set_of_predicates">Passing
+ a set of predicates</a></span></dt>
+<dt><span class="section"><a href="r_tree/queries.html#geometry_index.r_tree.queries.inserting_query_results_into_the_other_r_tree">Inserting
         query results into the other R-tree</a></span></dt>
 </dl></dd>
-<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html">Nearest
- neighbours queries</a></span></dt>
-<dd><dl>
-<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.k_nearest_neighbours">k
- nearest neighbours</a></span></dt>
-<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.one_nearest_neighbour">One
- nearest neighbour</a></span></dt>
-<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.distances_predicates">Distances
- predicates</a></span></dt>
-<dt><span class="section"><a href="r_tree/nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.using_spatial_predicates">Using
- spatial predicates</a></span></dt>
-</dl></dd>
 <dt><span class="section">Reference</span></dt>
 <dd><dl>
 <dt><span class="section">boost::geometry::index::rtree</span></dt>

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/creation_and_modification.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -7,7 +7,7 @@
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
 <link rel="prev" href="rtree_quickstart.html" title="Quick Start">
-<link rel="next" href="spatial_queries.html" title="Spatial queries">
+<link rel="next" href="queries.html" title="Queries">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -20,7 +20,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
@@ -357,7 +357,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
 </div>
 </body>
 </html>

Deleted: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,240 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Nearest neighbours queries</title>
-<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
-<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
-<link rel="up" href="../r_tree.html" title="R-tree">
-<link rel="prev" href="spatial_queries.html" title="Spatial queries">
-<link rel="next" href="reference.html" title="Reference">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
-<td align="center">Home</td>
-<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
-<td align="center">More</td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="geometry_index.r_tree.nearest_neighbours_queries"></a><a class="link" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">Nearest
- neighbours queries</a>
-</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.k_nearest_neighbours">k
- nearest neighbours</a></span></dt>
-<dt><span class="section"><a href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.one_nearest_neighbour">One
- nearest neighbour</a></span></dt>
-<dt><span class="section"><a href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.distances_predicates">Distances
- predicates</a></span></dt>
-<dt><span class="section"><a href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.using_spatial_predicates">Using
- spatial predicates</a></span></dt>
-</dl></div>
-<p>
- Nearest neighbours queries returns <code class="computeroutput"><span class="identifier">Value</span></code>s
- which are closest to some point in space. Additionally it is possible to
- pass distance predicates in order to define how the distance to the <code class="computeroutput"><span class="identifier">Value</span></code> should be calculated or minimal and
- maximal distances. The examples of some knn queries may be found in the table
- below. All queries returns 5 closest <code class="computeroutput"><span class="identifier">Values</span></code>.
- The query point, region and result Values are orange.
- </p>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- Basic knn query
- </p>
- </th>
-<th>
- <p>
- knn query - distance to Indexable's furthest point greather than
- ...
- </p>
- </th>
-<th>
- <p>
- knn query - distance to Indexable's closest point greather than
- ...
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/knn.png" alt="knn"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/knn_inters.png" alt="knn_inters"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/knn_cover.png" alt="knn_cover"></span>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.nearest_neighbours_queries.k_nearest_neighbours"></a><a class="link" href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.k_nearest_neighbours" title="k nearest neighbours">k
- nearest neighbours</a>
-</h4></div></div></div>
-<p>
- There are three ways of performing knn queries. Following queries returns
- k <code class="computeroutput">Value</code>s closest to some point in space. For <code class="computeroutput">Box</code>es
- <code class="computeroutput">Indexable</code>s the distance to the nearest point is calculated
- by default.
- </p>
-<p>
- Method call
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-</pre>
-<p>
- Function call
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-</pre>
-<p>
- Use of <code class="computeroutput"><span class="keyword">operator</span> <span class="special">|</span></code>
- </p>
-<pre class="programlisting">Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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">nearest_queried</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">))</span>
- <span class="special">;</span> <span class="comment">// do something with v</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.nearest_neighbours_queries.one_nearest_neighbour"></a><a class="link" href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.one_nearest_neighbour" title="One nearest neighbour">One
- nearest neighbour</a>
-</h4></div></div></div>
-<p>
- Another type of nearest neighbour query is searching for the one closest
- <code class="computeroutput">Value</code>. If it is found, 1 is returned by the method or function.
- This kind of query has only two forms.
- </p>
-<p>
- Method call
- </p>
-<pre class="programlisting">Value <span class="identifier">returned_value</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
-</pre>
-<p>
- Function call
- </p>
-<pre class="programlisting">Value <span class="identifier">Value</span> <span class="identifier">returned_value</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">returned_value</span><span class="special">);</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.nearest_neighbours_queries.distances_predicates"></a><a class="link" href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.distances_predicates" title="Distances predicates">Distances
- predicates</a>
-</h4></div></div></div>
-<p>
- It is possible to define if calculated distance between query point and
- <code class="computeroutput">Value</code> should be greater, lesser or between some other distances.
- Those are called <code class="computeroutput"><span class="identifier">DistancesPredicate</span></code>s
- and may be defined as follows.
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">__Value__</span><span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-
-<span class="comment">/* default - without bounds */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* same as default */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">unbounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* distance must be greater than or equal to 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* distance must be lesser than or equal to 500 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">max_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* distance must be between 10 and 500 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</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="number">10</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-</pre>
-<p>
- Furthermore, it's possible to define if the closest, furthest or centroidal
- point of the non-point <code class="computeroutput">Indexable</code> should be taken into account
- in the routine calculating distance.
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-
-<span class="comment">/* default - distance between Indexable's closest point and a query point
-must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* same as default - distance between Indexable's closest point and a query point
-must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* distance between Indexable's furthest point and a query point
-must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</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">k</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">returned_values</span><span class="special">));</span>
-
-<span class="comment">/* distance between Indexable's centroid and a query point
-must be greater than 10 */</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.nearest_neighbours_queries.using_spatial_predicates"></a><a class="link" href="nearest_neighbours_queries.html#geometry_index.r_tree.nearest_neighbours_queries.using_spatial_predicates" title="Using spatial predicates">Using
- spatial predicates</a>
-</h4></div></div></div>
-<p>
- It is possible to use spatial predicates described before in nearest neighbours
- queries.
- </p>
-<pre class="programlisting">Value <span class="identifier">returned_value</span><span class="special">;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-
-Point <span class="identifier">pt</span><span class="special">(...);</span>
-Box <span class="identifier">b</span><span class="special">(...);</span>
-
-<span class="identifier">size_t</span> <span class="identifier">n1</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">index</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">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="identifier">returned_value</span><span class="special">);</span>
-
-<span class="identifier">size_t</span> <span class="identifier">n2</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">b</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">returned_values</span><span class="special">));</span>
-
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span><span class="identifier">Value</span> <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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">nearest_queried</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">k</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">(</span><span class="identifier">b</span><span class="special">)))</span>
- <span class="special">;</span> <span class="comment">// do something with v</span>
-</pre>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2011-2013 Adam Wulkiewicz<p>
- Distributed under 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)
- </p>
-</div></td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-</body>
-</html>

Added: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/queries.html
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/queries.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -0,0 +1,538 @@
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
+<title>Queries</title>
+<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
+<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
+<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
+<link rel="up" href="../r_tree.html" title="R-tree">
+<link rel="prev" href="creation_and_modification.html" title="Creation and modification">
+<link rel="next" href="reference.html" title="Reference">
+</head>
+<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
+<table cellpadding="2" width="100%"><tr>
+<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
+<td align="center">Home</td>
+<td align="center">Libraries</td>
+<td align="center">People</td>
+<td align="center">FAQ</td>
+<td align="center">More</td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h3 class="title">
+<a name="geometry_index.r_tree.queries"></a><a class="link" href="queries.html" title="Queries">Queries</a>
+</h3></div></div></div>
+<div class="toc"><dl>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.performing_a_query">Performing
+ a query</a></span></dt>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.spatial_queries">Spatial
+ queries</a></span></dt>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries">Nearest
+ neighbours queries</a></span></dt>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.value_predicate">Value
+ predicate</a></span></dt>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.passing_a_set_of_predicates">Passing
+ a set of predicates</a></span></dt>
+<dt><span class="section"><a href="queries.html#geometry_index.r_tree.queries.inserting_query_results_into_the_other_r_tree">Inserting
+ query results into the other R-tree</a></span></dt>
+</dl></div>
+<p>
+ Queries returns <code class="computeroutput"><span class="identifier">Value</span></code>s which
+ meets some predicates. Currently supported are three types of predicates:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ spatial predicates - defining relationship between stored Values and
+ some Geometry,
+ </li>
+<li class="listitem">
+ nearest predicates - defining relationship between stored Values and
+ some Point,
+ </li>
+<li class="listitem">
+ value predicate - passing user-defined functor to the query.
+ </li>
+</ul></div>
+<p>
+ For example queries may be used to retrieve Values:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ intersecting some area but not within other area,
+ </li>
+<li class="listitem">
+ are nearest to some point,
+ </li>
+<li class="listitem">
+ overlapping a box and has user-defined property.
+ </li>
+</ul></div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.performing_a_query"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.performing_a_query" title="Performing a query">Performing
+ a query</a>
+</h4></div></div></div>
+<p>
+ There are three ways to perform a query. In the following example <code class="computeroutput">Box</code>
+ is used as the predicate, this is a default spatial predicate described
+ in the following section. Following queries returns <code class="computeroutput">Value</code>s
+ intersecting some region defined as a <code class="computeroutput">Box</code>.
+ These three methods are:
+ </p>
+<p>
+ Method call
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Box <span class="identifier">box_region</span><span class="special">(...);</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">box_region</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">returned_values</span><span class="special">));</span>
+</pre>
+<p>
+ Function call
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Box <span class="identifier">box_region</span><span class="special">(...);</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">box_region</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">returned_values</span><span class="special">));</span>
+</pre>
+<p>
+ Use of pipe operator generating a range
+ </p>
+<pre class="programlisting">Box <span class="identifier">box_region</span><span class="special">(...);</span>
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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><span class="special">(</span><span class="identifier">box_region</span><span class="special">))</span>
+ <span class="special">;</span> <span class="comment">// do something with v</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.spatial_queries"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.spatial_queries" title="Spatial queries">Spatial
+ queries</a>
+</h4></div></div></div>
+<p>
+ Spatial query returns Values which are related somehow to a geometry or
+ some number of geometries. Names of spatial predicates corresponds to names
+ of Boost.Geometry
+ algorithms. Examples of some basic queries may be found in tables below.
+ The query region and result <code class="computeroutput"><span class="identifier">Value</span></code>s
+ are orange.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ intersects(Box) - default
+ </p>
+ </th>
+<th>
+ <p>
+ covered_by(Box)
+ </p>
+ </th>
+<th>
+ <p>
+ disjoint(Box)
+ </p>
+ </th>
+<th>
+ <p>
+ overlaps(Box)
+ </p>
+ </th>
+<th>
+ <p>
+ within(Box)
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/intersects.png" alt="intersects"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/within.png" alt="within"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/disjoint.png" alt="disjoint"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/overlaps.png" alt="overlaps"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/within.png" alt="within"></span>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ intersects(Ring)
+ </p>
+ </th>
+<th>
+ <p>
+ intersects(Polygon)
+ </p>
+ </th>
+<th>
+ <p>
+ intersects(MultiPolygon)
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/intersects_ring.png" alt="intersects_ring"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/intersects_poly.png" alt="intersects_poly"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/intersects_mpoly.png" alt="intersects_mpoly"></span>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<p>
+ To use a spatial predicate one may pass a geometry (which is a default
+ case) or use one of the functions defined in <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">index</span></code>
+ namespace to define it explicitly.
+ </p>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</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="comment">// default case - intersects</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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="comment">// the same as default</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</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">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjont</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">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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="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">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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>
+</pre>
+<p>
+ All predicates may be negated, e.g.:
+ </p>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(!</span><span class="identifier">index</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="comment">// the same as</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjoint</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>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.nearest_neighbours_queries"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries" title="Nearest neighbours queries">Nearest
+ neighbours queries</a>
+</h4></div></div></div>
+<p>
+ Nearest neighbours queries returns <code class="computeroutput"><span class="identifier">Value</span></code>s
+ which are closest to some point in space. Additionally it is possible to
+ pass distance predicates in order to define how the distance to the <code class="computeroutput"><span class="identifier">Value</span></code> should be calculated or minimal
+ and maximal distances. The examples of some knn queries may be found in
+ the table below. All queries returns 5 closest <code class="computeroutput"><span class="identifier">Values</span></code>.
+ The query point, region and result Values are orange.
+ </p>
+<div class="informaltable"><table class="table">
+<colgroup>
+<col>
+<col>
+<col>
+</colgroup>
+<thead><tr>
+<th>
+ <p>
+ Basic knn query
+ </p>
+ </th>
+<th>
+ <p>
+ knn query - distance to Indexable's furthest point greather than
+ ...
+ </p>
+ </th>
+<th>
+ <p>
+ knn query - distance to Indexable's closest point greather than
+ ...
+ </p>
+ </th>
+</tr></thead>
+<tbody><tr>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/knn.png" alt="knn"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/knn_inters.png" alt="knn_inters"></span>
+ </p>
+ </td>
+<td>
+ <p>
+ <span class="inlinemediaobject"><img src="../../../images/knn_cover.png" alt="knn_cover"></span>
+ </p>
+ </td>
+</tr></tbody>
+</table></div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.queries.nearest_neighbours_queries.k_nearest_neighbours"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries.k_nearest_neighbours" title="k nearest neighbours">k
+ nearest neighbours</a>
+</h5></div></div></div>
+<p>
+ There are three ways of performing knn queries. Following queries returns
+ k <code class="computeroutput">Value</code>s closest to some point in space. For <code class="computeroutput">Box</code>es
+ <code class="computeroutput">Indexable</code>s the distance to the nearest point is calculated
+ by default.
+ </p>
+<p>
+ Method call
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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">k</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">returned_values</span><span class="special">));</span>
+</pre>
+<p>
+ Function call
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</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">k</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">returned_values</span><span class="special">));</span>
+</pre>
+<p>
+ Use of <code class="computeroutput"><span class="keyword">operator</span> <span class="special">|</span></code>
+ </p>
+<pre class="programlisting">Point <span class="identifier">pt</span><span class="special">(...);</span>
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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><span class="special">(</span><span class="identifier">index</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">k</span><span class="special">)))</span>
+ <span class="special">;</span> <span class="comment">// do something with v</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.queries.nearest_neighbours_queries.one_nearest_neighbour"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries.one_nearest_neighbour" title="One nearest neighbour">One
+ nearest neighbour</a>
+</h5></div></div></div>
+<p>
+ Another type of nearest neighbour query is searching for the one closest
+ <code class="computeroutput">Value</code>. If it is found, 1 is returned by the method or function.
+ This kind of query has only two forms.
+ </p>
+<p>
+ Method call
+ </p>
+<pre class="programlisting">Value <span class="identifier">returned_value</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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">returned_value</span><span class="special">);</span>
+</pre>
+<p>
+ Function call
+ </p>
+<pre class="programlisting">Value <span class="identifier">Value</span> <span class="identifier">returned_value</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+<span class="identifier">size_t</span> <span class="identifier">n</span> <span class="special">=</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</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">returned_value</span><span class="special">);</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h5 class="title">
+<a name="geometry_index.r_tree.queries.nearest_neighbours_queries.distances_predicates"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.nearest_neighbours_queries.distances_predicates" title="Distances predicates">Distances
+ predicates</a>
+</h5></div></div></div>
+<p>
+ It is possible to define if calculated distance between query point and
+ <code class="computeroutput">Value</code> should be greater, lesser or between some other distances.
+ Those are called <code class="computeroutput"><span class="identifier">DistancesPredicate</span></code>s
+ and may be defined as follows.
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">__Value__</span><span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+
+<span class="comment">/* default - without bounds */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</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">k</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">returned_values</span><span class="special">));</span>
+
+<span class="comment">/* same as default */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">unbounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
+
+<span class="comment">/* distance must be greater than or equal to 10 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
+
+<span class="comment">/* distance must be lesser than or equal to 500 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">max_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
+
+<span class="comment">/* distance must be between 10 and 500 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</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="number">10</span><span class="special">,</span> <span class="number">500</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
+</pre>
+<p>
+ Furthermore, it's possible to define if the closest, furthest or centroidal
+ point of the non-point <code class="computeroutput">Indexable</code> should be taken into account
+ in the routine calculating distance.
+ </p>
+<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
+Point <span class="identifier">pt</span><span class="special">(...);</span>
+
+<span class="comment">/* default - distance between Indexable's closest point and a query point
+must be greater than 10 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="number">10</span><span class="special">),</span> <span class="identifier">k</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">returned_values</span><span class="special">));</span>
+
+<span class="comment">/* same as default - distance between Indexable's closest point and a query point
+must be greater than 10 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_nearest</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</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">returned_values</span><span class="special">)
);</span>
+
+<span class="comment">/* distance between Indexable's furthest point and a query point
+must be greater than 10 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</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">k</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">returned_values</span><span class="special">
));</span>
+
+<span class="comment">/* distance between Indexable's centroid and a query point
+must be greater than 10 */</span>
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">min_bounded</span><span class="special">(</span><span class="identifier">pt</span><span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">to_centroid</span><span class="special">(</span><span class="number">10</span><span class="special">)),</span> <span class="identifier">k</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">returned_values</span><span class="special">
));</span>
+</pre>
+</div>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.value_predicate"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.value_predicate" title="Value predicate">Value
+ predicate</a>
+</h4></div></div></div>
+<p>
+ There is a unique predicate <code class="computeroutput"><span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span><span class="special">(...)</span></code> taking user-defined function/functor
+ which checks if <code class="computeroutput">Value</code> should be returned by the query. It
+ may be used to check some specific conditions for user-defined Values.
+ </p>
+<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">fun</span><span class="special">(</span>Value <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">)</span>
+<span class="special">{</span>
+ <span class="keyword">return</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">is_red</span><span class="special">();</span>
+<span class="special">}</span>
+
+<span class="comment">// ...</span>
+
+<span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</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="special">&amp;&amp;</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span><span class="special">(</span><span class="identifier">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>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.passing_a_set_of_predicates"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.passing_a_set_of_predicates" title="Passing a set of predicates">Passing
+ a set of predicates</a>
+</h4></div></div></div>
+<p>
+ It's possible to use some number of predicates in one query by passing:
+ </p>
+<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Pred1</span><span class="special">,</span>
+ <span class="identifier">Pred2</span><span class="special">&gt;</span></code>,
+ </li>
+<li class="listitem">
+ <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">Pred1</span><span class="special">,</span>
+ <span class="identifier">Pred2</span><span class="special">,</span>
+ <span class="identifier">Pred3</span><span class="special">,</span>
+ <span class="special">...&gt;</span></code>
+ </li>
+<li class="listitem">
+ predicates connected by <code class="computeroutput"><span class="keyword">operator</span><span class="special">&amp;&amp;</span></code> e.g. <code class="computeroutput"><span class="identifier">Pred1</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">Pred2</span>
+ <span class="special">&amp;&amp;</span> <span class="identifier">Pred3</span>
+ <span class="special">&amp;&amp;</span> <span class="special">...</span></code>.
+ </li>
+</ul></div>
+<p>
+ These predicates are connected by logical AND. Passing all predicates together
+ not only makes possible to construct advanced queries but is also faster
+ than separate calls because the tree is traversed only once. Traversing
+ is continued and <code class="computeroutput"><span class="identifier">Value</span></code>s
+ are returned only if all predicates are met. Predicates are checked left-to-right
+ so placing most restictive predicates first should accelerate the search.
+ </p>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</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">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box3</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>
+ Of course it's possible to connect different types of predicates together.
+ </p>
+<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">nearest</span><span class="special">(</span><span class="identifier">index</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">index</span><span class="special">::</span><span class="identifier">to_furthest</span><span class="special">(</span><span class="number">1</span><span class="special">),</span> <span class="number">10</span><span class="special">))</span> <span class="special">&amp;&amp;</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">b</span><span class="special">),</span> <span class="id
entifier">returned_value</span><span class="special">);</span>
+
+<span class="identifier">index</span><span class="special">::</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">index</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">k</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">b</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">returned_values</span><span class="special">));</span>
+
+<span class="identifier">BOOST_FOREACH</span><span class="special">(</span><span class="identifier">Value</span> <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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><span class="special">(</span><span class="identifier">index</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">k</span><span class="special">)</span> <span class="special">&amp;&amp;</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</span><span class="special">(</span><span class="identifier">b</span><span class="special">)))</span>
+ <span class="special">;</span> <span class="comment">// do something with v</span>
+</pre>
+</div>
+<div class="section">
+<div class="titlepage"><div><div><h4 class="title">
+<a name="geometry_index.r_tree.queries.inserting_query_results_into_the_other_r_tree"></a><a class="link" href="queries.html#geometry_index.r_tree.queries.inserting_query_results_into_the_other_r_tree" title="Inserting query results into the other R-tree">Inserting
+ query results into the other R-tree</a>
+</h4></div></div></div>
+<p>
+ There are several ways of inserting Values returned by a query to the other
+ R-tree container. The most basic way is creating a temporary container
+ for Values and insert them later.
+ </p>
+<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">bgi</span> <span class="special">=</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="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Box</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> Value<span class="special">;</span>
+<span class="keyword">typedef</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">linear</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">RTree</span><span class="special">;</span>
+
+<span class="identifier">RTree</span> <span class="identifier">rt1</span><span class="special">;</span>
+<span class="comment">/* some inserting into the tree */</span>
+
+<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span> <span class="identifier">result</span><span class="special">;</span>
+<span class="identifier">rt1</span><span class="special">.</span><span class="identifier">query</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">RTree</span> <span class="identifier">rt2</span><span class="special">(</span><span class="identifier">result</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
+</pre>
+<p>
+ However there are better ways. One of these methods is mentioned in the
+ "Creation and modification" section. The insert iterator may
+ be passed directly to the query, which will be the fastest way of inserting
+ query results because temporary container won't be used.
+ </p>
+<pre class="programlisting"><span class="identifier">RTree</span> <span class="identifier">rt3</span><span class="special">;</span>
+<span class="identifier">rt1</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">Box</span><span class="special">(/*...*/),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">inserter</span><span class="special">(</span><span class="identifier">rt3</span><span class="special">));</span>
+</pre>
+<p>
+ If you like Boost.Range you'll appreciate the third option. You may pass
+ the result Range directly to the constructor. However in this case the
+ temporary container is created.
+ </p>
+<pre class="programlisting"><span class="identifier">RTree</span> <span class="identifier">rt4</span><span class="special">(</span><span class="identifier">rt1</span> <span class="special">|</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">queried</span><span class="special">(</span><span class="identifier">Box</span><span class="special">(/*...*/)));</span>
+</pre>
+</div>
+</div>
+<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
+<td align="left"></td>
+<td align="right"><div class="copyright-footer">Copyright &#169; 2011-2013 Adam Wulkiewicz<p>
+ Distributed under 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)
+ </p>
+</div></td>
+</tr></table>
+<hr>
+<div class="spirit-nav">
+<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="reference.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
+</div>
+</body>
+</html>

Deleted: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/r_tree_creation.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,184 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>R-tree creation</title>
-<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
-<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
-<link rel="up" href="../r_tree.html" title="R-tree">
-<link rel="prev" href="rtree_quickstart.html" title="Quick Start">
-<link rel="next" href="spatial_queries.html" title="Spatial queries">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
-<td align="center">Home</td>
-<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
-<td align="center">More</td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="geometry_index.r_tree.r_tree_creation"></a><a class="link" href="r_tree_creation.html" title="R-tree creation">R-tree creation</a>
-</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.r_tree_template_parameters">R-tree
- template parameters</a></span></dt>
-<dt><span class="section"><a href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.values__indexables_and_default_translator">Values,
- Indexables and default Translator</a></span></dt>
-<dt><span class="section"><a href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_splitting_algorithms">Inserting
- and splitting algorithms</a></span></dt>
-<dt><span class="section"><a href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_removing_values">Inserting
- and removing Values</a></span></dt>
-</dl></div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.r_tree_creation.r_tree_template_parameters"></a><a class="link" href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.r_tree_template_parameters" title="R-tree template parameters">R-tree
- template parameters</a>
-</h4></div></div></div>
-<p>
- R-tree has 4 parameters:
- </p>
-<pre class="programlisting"><span class="identifier">rtree</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">,</span> <span class="identifier">Parameters</span><span class="special">,</span> <span class="identifier">Translator</span><span class="special">,</span> <span class="identifier">Allocator</span><span class="special">&gt;</span>
-</pre>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">Value</span></code> - type of object
- which will be stored in the container.
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">Parameters</span></code> - compile-time
- parameters, e.g. inserting/splitting algorithm with min and max nodes'
- elements numbers.
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">Translator</span></code> - type of
- object translating <code class="computeroutput"><span class="identifier">Value</span></code>
- objects to <code class="computeroutput"><span class="identifier">Indexable</span></code>
- objects (<code class="computeroutput">Point</code>
- or <code class="computeroutput">Box</code>)
- which R-tree can handle.
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">Allocator</span></code> - the allocator.
- </li>
-</ul></div>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.r_tree_creation.values__indexables_and_default_translator"></a><a class="link" href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.values__indexables_and_default_translator" title="Values, Indexables and default Translator">Values,
- Indexables and default Translator</a>
-</h4></div></div></div>
-<p>
- R-tree may store <code class="computeroutput">Value</code>s of any type as long the <code class="computeroutput">Translator</code>
- is passed as parameter. It knows how to interpret those <code class="computeroutput">Value</code>s
- and extract an object understandable by the R-tree. Those objects are called
- <code class="computeroutput">Indexable</code>s. Each type adapted to <code class="computeroutput">Point</code>
- or <code class="computeroutput">Box</code>
- concept is an <code class="computeroutput">Indexable</code>. Default <code class="computeroutput">Translator</code>
- <code class="computeroutput"><span class="identifier">index</span><span class="special">::</span><span class="identifier">translator</span><span class="special">::</span><span class="identifier">def</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span></code>
- is able to handle <code class="computeroutput">Point</code>,
- <code class="computeroutput">Box</code>,
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;...&gt;</span></code>,
- pointer, iterator or smart pointer.
- </p>
-<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; ">
-<li class="listitem">
- <code class="computeroutput">Indexable <span class="special">=</span> Point
- <span class="special">|</span> Box</code>
- </li>
-<li class="listitem">
- <code class="computeroutput"><span class="identifier">BasicValue</span> <span class="special">=</span>
- <span class="identifier">Indexable</span> <span class="special">|</span>
- <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span>Indexable<span class="special">,</span> <span class="identifier">T</span><span class="special">&gt;</span> <span class="special">|</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">T</span><span class="special">,</span> Indexable<span class="special">&gt;</span></code>
- </li>
-<li class="listitem">
- <code class="computeroutput">Value <span class="special">=</span> <span class="identifier">BasicValue</span>
- <span class="special">|</span> <span class="identifier">BasicValue</span><span class="special">*</span> <span class="special">|</span> <span class="identifier">Iterator</span><span class="special">&lt;</span><span class="identifier">BasicValue</span><span class="special">&gt;</span>
- <span class="special">|</span> <span class="identifier">SmartPtr</span><span class="special">&lt;</span><span class="identifier">BasicValue</span><span class="special">&gt;</span></code>
- </li>
-</ul></div>
-<p>
- Examples of <code class="computeroutput">Value</code> types:
- </p>
-<pre class="programlisting"><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point</span><span class="special">&lt;...&gt;</span>
-<span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">point_xy</span><span class="special">&lt;...&gt;</span>
-<span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special">&lt;...&gt;</span>
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">geometry</span><span class="special">::</span><span class="identifier">model</span><span class="special">::</span><span class="identifier">box</span><span class="special">&lt;...&gt;,</span> <span class="identifier">size_t</span><span class="special">&gt;</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.r_tree_creation.inserting_and_splitting_algorithms"></a><a class="link" href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_splitting_algorithms" title="Inserting and splitting algorithms">Inserting
- and splitting algorithms</a>
-</h4></div></div></div>
-<p>
- <code class="computeroutput">Value</code>s may be inserted to the R-tree in many various ways.
- Final internal structure of the R-tree depends on algorithms used in the
- insertion process. The most important is nodes' splitting algorithm. Currently,
- three well-known types of R-trees may be created.
- </p>
-<p>
- Linear - classic R-tree using splitting algorithm of linear complexity
- </p>
-<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">linear</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">rt</span><span class="special">;</span>
-</pre>
-<p>
- Quadratic - classic R-tree using splitting algorithm of quadratic complexity
- </p>
-<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">rt</span><span class="special">;</span>
-</pre>
-<p>
- R*-tree - splitting algorithm minimizing nodes' overlap with forced reinsertions
- </p>
-<pre class="programlisting"><span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">rstar</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">rt</span><span class="special">;</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.r_tree_creation.inserting_and_removing_values"></a><a class="link" href="r_tree_creation.html#geometry_index.r_tree.r_tree_creation.inserting_and_removing_values" title="Inserting and removing Values">Inserting
- and removing Values</a>
-</h4></div></div></div>
-<p>
- Following code creates an R-tree using quadratic algorithm.
- </p>
-<pre class="programlisting"><span class="keyword">using</span> <span class="keyword">namespace</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">geometry</span><span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Box</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> Value<span class="special">;</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">quadratic</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">rt</span><span class="special">;</span>
-</pre>
-<p>
- To insert or remove Value's by method calls one may use the following code.
- </p>
-<pre class="programlisting">Value <span class="identifier">v</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span>Box<span class="special">(...),</span> <span class="number">0</span><span class="special">);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">remove</span><span class="special">(</span><span class="identifier">v</span><span class="special">);</span>
-</pre>
-<p>
- To insert or remove Value's by function calls one may use the following
- code.
- </p>
-<pre class="programlisting">Value <span class="identifier">v</span> <span class="special">=</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span>Box<span class="special">(...),</span> <span class="number">0</span><span class="special">);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">insert</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">remove</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">v</span><span class="special">);</span>
-</pre>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2011, 2012 Adam Wulkiewicz<br>Copyright &#169; 2008 Federico J. Fernandez<p>
- Distributed under 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)
- </p>
-</div></td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="rtree_quickstart.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="spatial_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-</body>
-</html>

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 20:27:59 EST (Fri, 25 Jan 2013)
@@ -6,7 +6,7 @@
 <meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
 <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
 <link rel="up" href="../r_tree.html" title="R-tree">
-<link rel="prev" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
+<link rel="prev" href="queries.html" title="Queries">
 </head>
 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
 <table cellpadding="2" width="100%"><tr>
@@ -19,7 +19,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
 </div>
 <div class="section">
 <div class="titlepage"><div><div><h3 class="title">
@@ -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="id894058"></a><a class="indexterm" name="id894062"></a><a class="indexterm" name="id894067"></a><a class="indexterm" name="id894072"></a>
+ <a class="indexterm" name="id885601"></a><a class="indexterm" name="id885606"></a><a class="indexterm" name="id885611"></a><a class="indexterm" name="id885616"></a>
 The R-tree spatial index.
         </p>
 <h6>
@@ -6913,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="id939010"></a><a class="indexterm" name="id939015"></a><a class="indexterm" name="id939020"></a><a class="indexterm" name="id939024"></a>
+ <a class="indexterm" name="id930676"></a><a class="indexterm" name="id930681"></a><a class="indexterm" name="id930686"></a><a class="indexterm" name="id930691"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -6988,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="id939318"></a><a class="indexterm" name="id939323"></a><a class="indexterm" name="id939328"></a><a class="indexterm" name="id939333"></a>
+ <a class="indexterm" name="id930985"></a><a class="indexterm" name="id930990"></a><a class="indexterm" name="id930994"></a><a class="indexterm" name="id930999"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -7063,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="id939627"></a><a class="indexterm" name="id939632"></a><a class="indexterm" name="id939636"></a><a class="indexterm" name="id939641"></a>
+ <a class="indexterm" name="id932522"></a><a class="indexterm" name="id932527"></a><a class="indexterm" name="id932532"></a><a class="indexterm" name="id932537"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
@@ -7167,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="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>
+ <a class="indexterm" name="id932957"></a><a class="indexterm" name="id932962"></a><a class="indexterm" name="id932966"></a><a class="indexterm" name="id932971"></a><a class="indexterm" name="id932976"></a>
 Linear r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -7303,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="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>
+ <a class="indexterm" name="id933434"></a><a class="indexterm" name="id933439"></a><a class="indexterm" name="id933444"></a><a class="indexterm" name="id933449"></a><a class="indexterm" name="id933454"></a>
 Quadratic r-tree creation algorithm parameters.
           </p>
 <h6>
@@ -7439,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="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>
+ <a class="indexterm" name="id933912"></a><a class="indexterm" name="id933917"></a><a class="indexterm" name="id933922"></a><a class="indexterm" name="id933926"></a><a class="indexterm" name="id933931"></a>
 R*-tree creation algorithm parameters.
           </p>
 <h6>
@@ -10167,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="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>
+ <a class="indexterm" name="id949787"></a><a class="indexterm" name="id949791"></a><a class="indexterm" name="id949796"></a><a class="indexterm" name="id949801"></a><a class="indexterm" name="id949806"></a>
 The default translator.
           </p>
 <h6>
@@ -10237,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="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>
+ <a class="indexterm" name="id950070"></a><a class="indexterm" name="id950075"></a><a class="indexterm" name="id950079"></a><a class="indexterm" name="id950084"></a><a class="indexterm" name="id950089"></a>
 The index translator.
           </p>
 <h6>
@@ -10533,7 +10533,7 @@
 </tr></table>
 <hr>
 <div class="spirit-nav">
-<a accesskey="p" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
+<a accesskey="p" href="queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a>
 </div>
 </body>
 </html>

Modified: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html (original)
+++ sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/rtree_quickstart.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -116,7 +116,7 @@
 <pre class="programlisting"><span class="comment">// find values intersecting some area defined by a box</span>
 <span class="identifier">box</span> <span class="identifier">query_box</span><span class="special">(</span><span class="identifier">point</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</span><span class="special">),</span> <span class="identifier">point</span><span class="special">(</span><span class="number">5</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">vector</span><span class="special">&lt;</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="identifier">result_s</span><span class="special">;</span>
-<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">query_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_s</span><span class="special">));</span>
+<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">query</span><span class="special">(</span><span class="identifier">query_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_s</span><span class="special">));</span>
 </pre>
 <p>
       </p>
@@ -130,7 +130,7 @@
 </p>
 <pre class="programlisting"><span class="comment">// find 5 nearest values to a point</span>
 <span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">value</span><span class="special">&gt;</span> <span class="identifier">result_n</span><span class="special">;</span>
-<span class="identifier">rtree</span><span class="special">.</span><span class="identifier">nearest_query</span><span class="special">(</span><span class="identifier">point</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</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_n</span><span class="special">));</span>
+<span class="identifier">rtree</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">point</span><span class="special">(</span><span class="number">0</span><span class="special">,</span> <span class="number">0</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_n</span><span class="special">));</span>
 </pre>
 <p>
       </p>

Deleted: sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html
==============================================================================
--- sandbox-branches/geometry/index/doc/html/geometry_index/r_tree/spatial_queries.html 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,308 +0,0 @@
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
-<title>Spatial queries</title>
-<link rel="stylesheet" href="http://www.boost.org/doc/libs/release/doc/src/boostbook.css" type="text/css">
-<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
-<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Geometry Index">
-<link rel="up" href="../r_tree.html" title="R-tree">
-<link rel="prev" href="creation_and_modification.html" title="Creation and modification">
-<link rel="next" href="nearest_neighbours_queries.html" title="Nearest neighbours queries">
-</head>
-<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
-<table cellpadding="2" width="100%"><tr>
-<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="http://www.boost.org/doc/libs/release/boost.png"></td>
-<td align="center">Home</td>
-<td align="center">Libraries</td>
-<td align="center">People</td>
-<td align="center">FAQ</td>
-<td align="center">More</td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h3 class="title">
-<a name="geometry_index.r_tree.spatial_queries"></a><a class="link" href="spatial_queries.html" title="Spatial queries">Spatial queries</a>
-</h3></div></div></div>
-<div class="toc"><dl>
-<dt><span class="section"><a href="spatial_queries.html#geometry_index.r_tree.spatial_queries.basic_queries">Basic
- queries</a></span></dt>
-<dt><span class="section"><a href="spatial_queries.html#geometry_index.r_tree.spatial_queries.spatial_predicates">Spatial
- predicates</a></span></dt>
-<dt><span class="section"><a href="spatial_queries.html#geometry_index.r_tree.spatial_queries.connecting_predicates">Connecting
- predicates</a></span></dt>
-<dt><span class="section"><a href="spatial_queries.html#geometry_index.r_tree.spatial_queries.value_predicate">Value
- predicate</a></span></dt>
-<dt><span class="section"><a href="spatial_queries.html#geometry_index.r_tree.spatial_queries.inserting_query_results_into_the_other_r_tree">Inserting
- query results into the other R-tree</a></span></dt>
-</dl></div>
-<p>
- Spatial queries returns <code class="computeroutput"><span class="identifier">Value</span></code>s
- which meets some predicates. For instance it may be used to retrieve Values
- intersecting some area or are within some other area. Names of predicates
- corresponds to names of Boost.Geometry
- algorithms. The examples of some basic queries may be found in tables below.
- The query region and result <code class="computeroutput"><span class="identifier">Value</span></code>s
- are orange.
- </p>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- intersects(Box) - default
- </p>
- </th>
-<th>
- <p>
- covered_by(Box)
- </p>
- </th>
-<th>
- <p>
- disjoint(Box)
- </p>
- </th>
-<th>
- <p>
- overlaps(Box)
- </p>
- </th>
-<th>
- <p>
- within(Box)
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/intersects.png" alt="intersects"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/within.png" alt="within"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/disjoint.png" alt="disjoint"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/overlaps.png" alt="overlaps"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/within.png" alt="within"></span>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<div class="informaltable"><table class="table">
-<colgroup>
-<col>
-<col>
-<col>
-</colgroup>
-<thead><tr>
-<th>
- <p>
- intersects(Ring)
- </p>
- </th>
-<th>
- <p>
- intersects(Polygon)
- </p>
- </th>
-<th>
- <p>
- intersects(MultiPolygon)
- </p>
- </th>
-</tr></thead>
-<tbody><tr>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/intersects_ring.png" alt="intersects_ring"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/intersects_poly.png" alt="intersects_poly"></span>
- </p>
- </td>
-<td>
- <p>
- <span class="inlinemediaobject"><img src="../../../images/intersects_mpoly.png" alt="intersects_mpoly"></span>
- </p>
- </td>
-</tr></tbody>
-</table></div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.spatial_queries.basic_queries"></a><a class="link" href="spatial_queries.html#geometry_index.r_tree.spatial_queries.basic_queries" title="Basic queries">Basic
- queries</a>
-</h4></div></div></div>
-<p>
- There are three ways to perform a spatial query. Following queries returns
- <code class="computeroutput">Value</code>s intersecting some region defined as a box in this example.
- </p>
-<p>
- Method call
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Box <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">box_region</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">returned_values</span><span class="special">));</span>
-</pre>
-<p>
- Function call
- </p>
-<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span>Value<span class="special">&gt;</span> <span class="identifier">returned_values</span><span class="special">;</span>
-Box <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">index</span><span class="special">::</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">rt</span><span class="special">,</span> <span class="identifier">box_region</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">returned_values</span><span class="special">));</span>
-</pre>
-<p>
- Use of pipe operator generating a range
- </p>
-<pre class="programlisting">Box <span class="identifier">box_region</span><span class="special">(...);</span>
-<span class="identifier">BOOST_FOREACH</span><span class="special">(</span>Value <span class="special">&amp;</span> <span class="identifier">v</span><span class="special">,</span> <span class="identifier">rt</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">spatial_queried</span><span class="special">(</span><span class="identifier">box_region</span><span class="special">))</span>
- <span class="special">;</span> <span class="comment">// do something with v</span>
-</pre>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.spatial_queries.spatial_predicates"></a><a class="link" href="spatial_queries.html#geometry_index.r_tree.spatial_queries.spatial_predicates" title="Spatial predicates">Spatial
- predicates</a>
-</h4></div></div></div>
-<p>
- To explicitly define one of the predicates one may pass it to the <code class="computeroutput"><span class="identifier">spatial_query</span><span class="special">()</span></code>
- as the first argument.
- </p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</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="comment">// default case - intersects</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</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="comment">// the same as default</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">covered_by</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">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjont</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">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</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="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">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</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>
-</pre>
-<p>
- All predicates may be negated, e.g.:
- </p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(!</span><span class="identifier">index</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="comment">// the same as</span>
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">disjoint</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>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.spatial_queries.connecting_predicates"></a><a class="link" href="spatial_queries.html#geometry_index.r_tree.spatial_queries.connecting_predicates" title="Connecting predicates">Connecting
- predicates</a>
-</h4></div></div></div>
-<p>
- It's possible to use some number of predicates in one time by passing
- <code class="computeroutput"><span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Pred1</span><span class="special">,</span> <span class="identifier">Pred2</span><span class="special">&gt;</span></code>
- or <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">tuple</span><span class="special">&lt;</span><span class="identifier">Pred1</span><span class="special">,</span> <span class="identifier">Pred2</span><span class="special">,</span> <span class="identifier">Pred3</span><span class="special">,</span> <span class="special">...&gt;</span></code>. These predicates are connected
- by logical AND. Passing all predicates together not only makes possible
- to construct advanced queries but is also faster than separate calls because
- the tree is traversed only once. Traversing is continued and <code class="computeroutput"><span class="identifier">Value</span></code>s are returned only if all predicates
- are met. Predicates are checked left-to-right so placing most restictive
- predicates first should accelerate the search.
- </p>
-<pre class="programlisting"><span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_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">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">),</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</span><span class="special">)</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">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_tuple</span><span class="special">(</span>
- <span class="identifier">index</span><span class="special">::</span><span class="identifier">intersects</span><span class="special">(</span><span class="identifier">box1</span><span class="special">),</span> <span class="special">!</span><span class="identifier">index</span><span class="special">::</span><span class="identifier">within</span><span class="special">(</span><span class="identifier">box2</span><span class="special">),</span> <span class="identifier">index</span><span class="special">::</span><span class="identifier">overlaps</span><span class="special">(</span><span class="identifier">box3</span><span class="special">)</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>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.spatial_queries.value_predicate"></a><a class="link" href="spatial_queries.html#geometry_index.r_tree.spatial_queries.value_predicate" title="Value predicate">Value
- predicate</a>
-</h4></div></div></div>
-<p>
- There is also a unique predicate <code class="computeroutput"><span class="identifier">index</span><span class="special">::</span><span class="identifier">value</span><span class="special">(...)</span></code> taking user-defined function/functor
- which checks if <code class="computeroutput">Value</code> should be returned by the query.
- </p>
-<pre class="programlisting"><span class="keyword">bool</span> <span class="identifier">fun</span><span class="special">(</span>Value <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">v</span><span class="special">)</span>
-<span class="special">{</span>
- <span class="keyword">return</span> <span class="identifier">v</span><span class="special">.</span><span class="identifier">is_red</span><span class="special">();</span>
-<span class="special">}</span>
-
-<span class="comment">// ...</span>
-
-<span class="identifier">rt</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span>
- <span class="identifier">boost</span><span class="special">::</span><span class="identifier">make_pair</span><span class="special">(</span>
- <span class="identifier">index</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">index</span><span class="special">::</span><span class="identifier">value</span><span class="special">(</span><span class="identifier">fun</span><span class="special">)</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>
-</div>
-<div class="section">
-<div class="titlepage"><div><div><h4 class="title">
-<a name="geometry_index.r_tree.spatial_queries.inserting_query_results_into_the_other_r_tree"></a><a class="link" href="spatial_queries.html#geometry_index.r_tree.spatial_queries.inserting_query_results_into_the_other_r_tree" title="Inserting query results into the other R-tree">Inserting
- query results into the other R-tree</a>
-</h4></div></div></div>
-<p>
- There are several ways of inserting Values returned by a query to the other
- R-tree container. The most basic way is creating a temporary container
- for Values and insert them later.
- </p>
-<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">bgi</span> <span class="special">=</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="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">pair</span><span class="special">&lt;</span><span class="identifier">Box</span><span class="special">,</span> <span class="keyword">int</span><span class="special">&gt;</span> Value<span class="special">;</span>
-<span class="keyword">typedef</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">rtree</span><span class="special">&lt;</span> Value<span class="special">,</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">linear</span><span class="special">&lt;</span><span class="number">32</span><span class="special">,</span> <span class="number">8</span><span class="special">&gt;</span> <span class="special">&gt;</span> <span class="identifier">RTree</span><span class="special">;</span>
-
-<span class="identifier">RTree</span> <span class="identifier">rt1</span><span class="special">;</span>
-<span class="comment">/* some inserting into the tree */</span>
-
-<span class="identifier">std</span><span class="special">::</span><span class="identifier">vector</span><span class="special">&lt;</span><span class="identifier">Value</span><span class="special">&gt;</span> <span class="identifier">result</span><span class="special">;</span>
-<span class="identifier">rt1</span><span class="special">.</span><span class="identifier">spatial_query</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">RTree</span> <span class="identifier">rt2</span><span class="special">(</span><span class="identifier">result</span><span class="special">.</span><span class="identifier">begin</span><span class="special">(),</span> <span class="identifier">result</span><span class="special">.</span><span class="identifier">end</span><span class="special">());</span>
-</pre>
-<p>
- However there are better ways. One of these methods is mentioned in the
- "Creation and modification" section. The insert iterator may
- be passed directly to the query, which will be the fastest way of inserting
- query results because temporary container won't be used.
- </p>
-<pre class="programlisting"><span class="identifier">RTree</span> <span class="identifier">rt3</span><span class="special">;</span>
-<span class="identifier">rt1</span><span class="special">.</span><span class="identifier">spatial_query</span><span class="special">(</span><span class="identifier">Box</span><span class="special">(/*...*/),</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">inserter</span><span class="special">(</span><span class="identifier">rt3</span><span class="special">));</span>
-</pre>
-<p>
- If you like Boost.Range you'll appreciate the third option. You may pass
- the result Range directly to the constructor.
- </p>
-<pre class="programlisting"><span class="identifier">RTree</span> <span class="identifier">rt4</span><span class="special">(</span><span class="identifier">rt1</span> <span class="special">|</span> <span class="identifier">bgi</span><span class="special">::</span><span class="identifier">adaptors</span><span class="special">::</span><span class="identifier">spatial_queried</span><span class="special">(</span><span class="identifier">Box</span><span class="special">(/*...*/)));</span>
-</pre>
-</div>
-</div>
-<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"></td>
-<td align="right"><div class="copyright-footer">Copyright &#169; 2011-2013 Adam Wulkiewicz<p>
- Distributed under 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)
- </p>
-</div></td>
-</tr></table>
-<hr>
-<div class="spirit-nav">
-<a accesskey="p" href="creation_and_modification.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../r_tree.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="nearest_neighbours_queries.html"><img src="http://www.boost.org/doc/libs/release/doc/src/images/next.png" alt="Next"></a>
-</div>
-</body>
-</html>

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 20:27:59 EST (Fri, 25 Jan 2013)
@@ -43,16 +43,14 @@
 <dt><span class="section">Quick Start</span></dt>
 <dt><span class="section"><a href="geometry_index/r_tree/creation_and_modification.html">Creation
       and modification</a></span></dt>
-<dt><span class="section">Spatial queries</span></dt>
-<dt><span class="section"><a href="geometry_index/r_tree/nearest_neighbours_queries.html">Nearest
- neighbours queries</a></span></dt>
+<dt><span class="section">Queries</span></dt>
 <dt><span class="section">Reference</span></dt>
 </dl></dd>
 </dl>
 </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 26, 2013 at 00:31:44 GMT</small></p></td>
+<td align="left"><p><small>Last revised: January 26, 2013 at 01:20:57 GMT</small></p></td>
 <td align="right"><div class="copyright-footer"></div></td>
 </tr></table>
 <hr>

Modified: sandbox-branches/geometry/index/doc/rtree.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/rtree.qbk (original)
+++ sandbox-branches/geometry/index/doc/rtree.qbk 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -13,9 +13,7 @@
 [include rtree/introduction.qbk]
 [include rtree/quickstart.qbk]
 [include rtree/creation.qbk]
-[include rtree/spatial_query.qbk]
-[include rtree/nearest_query.qbk]
-[/include rtree/exception_safety.qbk]
+[include rtree/query.qbk]
 
 [section:reference Reference]
 

Deleted: sandbox-branches/geometry/index/doc/rtree/nearest_query.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/rtree/nearest_query.qbk 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,137 +0,0 @@
-[/============================================================================
- Boost.Geometry Index
-
- Copyright (c) 2011-2012 Adam Wulkiewicz.
-
- 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)
-=============================================================================/]
-
-[section Nearest neighbours queries]
-
-Nearest neighbours queries returns `Value`s which are closest to some point in space.
-Additionally it is possible to pass distance predicates in order to define how the distance
-to the `Value` should be calculated or minimal and maximal distances. The examples of some knn
-queries may be found in the table below. All queries returns 5 closest `Values`.
-The query point, region and result Values are orange.
-
-[table
-[[Basic knn query] [knn query - distance to Indexable's furthest point greather than ...] [knn query - distance to Indexable's closest point greather than ...]]
-[[[$../images/knn.png]] [[$../images/knn_inters.png]] [[$../images/knn_cover.png]]]
-]
-
-[section k nearest neighbours]
-
-There are three ways of performing knn queries. Following queries returns
-k `__value__`s closest to some point in space. For `__box__`es
-`__indexable__`s the distance to the nearest point is calculated by default.
-
-Method call
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
- rt.nearest_query(pt, k, std::back_inserter(returned_values));
-
-Function call
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
- index::nearest_query(rt, pt, k, std::back_inserter(returned_values));
-
-Use of `operator |`
-
- __point__ pt(...);
- BOOST_FOREACH(__value__ & v, rt | index::adaptors::nearest_queried(pt, k))
- ; // do something with v
-
-[endsect]
-
-[section One nearest neighbour]
-
-Another type of nearest neighbour query is searching for the one closest `__value__`.
-If it is found, 1 is returned by the method or function. This kind of query
-has only two forms.
-
-Method call
-
- __value__ returned_value;
- __point__ pt(...);
- size_t n = rt.nearest_query(pt, returned_value);
-
-Function call
-
- __value__ Value returned_value;
- __point__ pt(...);
- size_t n = index::nearest_query(rt, pt, returned_value);
-
-[endsect]
-
-[section Distances predicates]
-
-It is possible to define if calculated distance between query point and `__value__` should be
-greater, lesser or between some other distances. Those are called `DistancesPredicate`s and
-may be defined as follows.
-
- std::vector<__Value__> returned_values;
- __point__ pt(...);
-
- /* default - without bounds */
- index::nearest_query(rt, pt, k, std::back_inserter(returned_values));
-
- /* same as default */
- index::nearest_query(rt, index::unbounded(pt), k, std::back_inserter(returned_values));
-
- /* distance must be greater than or equal to 10 */
- index::nearest_query(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
-
- /* distance must be lesser than or equal to 500 */
- index::nearest_query(rt, index::max_bounded(pt, 500), k, std::back_inserter(returned_values));
-
- /* distance must be between 10 and 500 */
- index::nearest_query(rt, index::bounded(pt, 10, 500), k, std::back_inserter(returned_values));
-
-Furthermore, it's possible to define if the closest, furthest or centroidal point of the
-non-point `__indexable__` should be taken into account in the routine calculating distance.
-
- std::vector<__value__> returned_values;
- __point__ pt(...);
-
- /* default - distance between Indexable's closest point and a query point
- must be greater than 10 */
- index::nearest_query(rt, index::min_bounded(pt, 10), k, std::back_inserter(returned_values));
-
- /* same as default - distance between Indexable's closest point and a query point
- must be greater than 10 */
- index::nearest_query(rt, index::min_bounded(pt, index::to_nearest(10)), k, std::back_inserter(returned_values));
-
- /* distance between Indexable's furthest point and a query point
- must be greater than 10 */
- index::nearest_query(rt, index::min_bounded(pt, index::to_furthest(10)), k, std::back_inserter(returned_values));
-
- /* distance between Indexable's centroid and a query point
- must be greater than 10 */
- index::nearest_query(rt, index::min_bounded(pt, index::to_centroid(10)), k, std::back_inserter(returned_values));
-
-[endsect]
-
-[section Using spatial predicates]
-
-It is possible to use spatial predicates described before in nearest neighbours queries.
-
- __value__ returned_value;
- std::vector<__value__> returned_values;
-
- __point__ pt(...);
- __box__ b(...);
-
- size_t n1 = rt.nearest_query(index::bounded(pt, index::to_furthest(1), 10), index::intersects(b), returned_value);
-
- size_t n2 = index::nearest_query(rt, pt, k, index::within(b), std::back_inserter(returned_values));
-
- BOOST_FOREACH(Value & v, rt | index::adaptors::nearest_queried(pt, k, index::covered_by(b)))
- ; // do something with v
-
-[endsect]
-
-[endsect] [/ Nearest neighbours queries /]

Added: sandbox-branches/geometry/index/doc/rtree/query.qbk
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/doc/rtree/query.qbk 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -0,0 +1,273 @@
+[/============================================================================
+ Boost.Geometry Index
+
+ Copyright (c) 2011-2012 Adam Wulkiewicz.
+
+ 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)
+=============================================================================/]
+
+[section Queries]
+
+Queries returns `Value`s which meets some predicates. Currently supported are three types of predicates:
+
+* spatial predicates - defining relationship between stored Values and some Geometry,
+* nearest predicates - defining relationship between stored Values and some Point,
+* value predicate - passing user-defined functor to the query.
+
+For example queries may be used to retrieve Values:
+
+* intersecting some area but not within other area,
+* are nearest to some point,
+* overlapping a box and has user-defined property.
+
+[section Performing a query]
+
+There are three ways to perform a query. In the following example `__box__` is used as
+the predicate, this is a default spatial predicate described in the following section.
+Following queries returns `__value__`s intersecting some region defined as a `__box__`.
+These three methods are:
+
+Method call
+
+ std::vector<__value__> returned_values;
+ __box__ box_region(...);
+ rt.query(box_region, std::back_inserter(returned_values));
+
+Function call
+
+ std::vector<__value__> returned_values;
+ __box__ box_region(...);
+ index::query(rt, box_region, std::back_inserter(returned_values));
+
+Use of pipe operator generating a range
+
+ __box__ box_region(...);
+ BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(box_region))
+ ; // do something with v
+
+[endsect]
+
+[section Spatial queries]
+
+Spatial query returns Values which are related somehow to a geometry or some number of geometries.
+Names of spatial predicates corresponds to names of __boost_geometry__ algorithms. Examples of some
+basic queries may be found in tables below. The query region and result `Value`s are orange.
+
+[table
+[[intersects(Box) - default] [covered_by(Box)] [disjoint(Box)] [overlaps(Box)] [within(Box)]]
+[[[$../images/intersects.png]] [[$../images/within.png]] [[$../images/disjoint.png]] [[$../images/overlaps.png]] [[$../images/within.png]]]
+]
+
+[table
+[[intersects(Ring)] [intersects(Polygon)] [intersects(MultiPolygon)]]
+[[[$../images/intersects_ring.png]] [[$../images/intersects_poly.png]] [[$../images/intersects_mpoly.png]]]
+]
+
+To use a spatial predicate one may pass a geometry (which is a default case) or use one of the functions defined in
+`boost::geometry::index` namespace to define it explicitly.
+
+ rt.query(box, std::back_inserter(result)); // default case - intersects
+ rt.query(index::intersects(box), std::back_inserter(result)); // the same as default
+ rt.query(index::covered_by(box), std::back_inserter(result));
+ rt.query(index::disjont(box), std::back_inserter(result));
+ rt.query(index::overlaps(box), std::back_inserter(result));
+ rt.query(index::within(box), std::back_inserter(result));
+
+All predicates may be negated, e.g.:
+
+ rt.query(!index::intersects(box), std::back_inserter(result));
+ // the same as
+ rt.query(index::disjoint(box), std::back_inserter(result));
+
+[endsect]
+
+[section Nearest neighbours queries]
+
+Nearest neighbours queries returns `Value`s which are closest to some point in space.
+Additionally it is possible to pass distance predicates in order to define how the distance
+to the `Value` should be calculated or minimal and maximal distances. The examples of some knn
+queries may be found in the table below. All queries returns 5 closest `Values`.
+The query point, region and result Values are orange.
+
+[table
+[[Basic knn query] [knn query - distance to Indexable's furthest point greather than ...] [knn query - distance to Indexable's closest point greather than ...]]
+[[[$../images/knn.png]] [[$../images/knn_inters.png]] [[$../images/knn_cover.png]]]
+]
+
+[section k nearest neighbours]
+
+There are three ways of performing knn queries. Following queries returns
+k `__value__`s closest to some point in space. For `__box__`es
+`__indexable__`s the distance to the nearest point is calculated by default.
+
+Method call
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+ rt.query(index::nearest(pt, k), std::back_inserter(returned_values));
+
+Function call
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+ index::query(rt, index::nearest(pt, k), std::back_inserter(returned_values));
+
+Use of `operator |`
+
+ __point__ pt(...);
+ BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(index::nearest(pt, k)))
+ ; // do something with v
+
+[endsect]
+
+[section One nearest neighbour]
+
+Another type of nearest neighbour query is searching for the one closest `__value__`.
+If it is found, 1 is returned by the method or function. This kind of query
+has only two forms.
+
+Method call
+
+ __value__ returned_value;
+ __point__ pt(...);
+ size_t n = rt.query(index::nearest(pt), returned_value);
+
+Function call
+
+ __value__ Value returned_value;
+ __point__ pt(...);
+ size_t n = index::query(rt, index::nearest(pt), returned_value);
+
+[endsect]
+
+[section Distances predicates]
+
+It is possible to define if calculated distance between query point and `__value__` should be
+greater, lesser or between some other distances. Those are called `DistancesPredicate`s and
+may be defined as follows.
+
+ std::vector<__Value__> returned_values;
+ __point__ pt(...);
+
+ /* default - without bounds */
+ index::query(rt, index::nearest(pt, k), std::back_inserter(returned_values));
+
+ /* same as default */
+ index::query(rt, index::nearest(index::unbounded(pt), k), std::back_inserter(returned_values));
+
+ /* distance must be greater than or equal to 10 */
+ index::query(rt, index::nearest(index::min_bounded(pt, 10), k), std::back_inserter(returned_values));
+
+ /* distance must be lesser than or equal to 500 */
+ index::query(rt, index::nearest(index::max_bounded(pt, 500), k), std::back_inserter(returned_values));
+
+ /* distance must be between 10 and 500 */
+ index::query(rt, index::nearest(index::bounded(pt, 10, 500), k), std::back_inserter(returned_values));
+
+Furthermore, it's possible to define if the closest, furthest or centroidal point of the
+non-point `__indexable__` should be taken into account in the routine calculating distance.
+
+ std::vector<__value__> returned_values;
+ __point__ pt(...);
+
+ /* default - distance between Indexable's closest point and a query point
+ must be greater than 10 */
+ index::query(rt, index::nearest(index::min_bounded(pt, 10), k), std::back_inserter(returned_values));
+
+ /* same as default - distance between Indexable's closest point and a query point
+ must be greater than 10 */
+ index::query(rt, index::nearest(index::min_bounded(pt, index::to_nearest(10)), k), std::back_inserter(returned_values));
+
+ /* distance between Indexable's furthest point and a query point
+ must be greater than 10 */
+ index::query(rt, index::nearest(index::min_bounded(pt, index::to_furthest(10)), k), std::back_inserter(returned_values));
+
+ /* distance between Indexable's centroid and a query point
+ must be greater than 10 */
+ index::query(rt, index::nearest(index::min_bounded(pt, index::to_centroid(10)), k), std::back_inserter(returned_values));
+
+[endsect]
+
+[endsect]
+
+[section Value predicate]
+
+There is a unique predicate `index::value(...)` taking user-defined function/functor
+which checks if `__value__` should be returned by the query. It may be used to check
+some specific conditions for user-defined Values.
+
+ bool fun(__value__ const& v)
+ {
+ return v.is_red();
+ }
+
+ // ...
+
+ rt.query(index::intersects(box) && index::value(fun),
+ std::back_inserter(result));
+
+[endsect]
+
+[section Passing a set of predicates]
+
+It's possible to use some number of predicates in one query by passing:
+
+* `std::pair<Pred1, Pred2>`,
+* `boost::tuple<Pred1, Pred2, Pred3, ...>`
+* predicates connected by `operator&&` e.g. `Pred1 && Pred2 && Pred3 && ...`.
+
+These predicates are connected by logical AND. Passing all predicates together not only makes possible
+to construct advanced queries but is also faster than separate calls because the tree is traversed only once.
+Traversing is continued and `Value`s are returned only if all predicates are met. Predicates are checked
+left-to-right so placing most restictive predicates first should accelerate the search.
+
+ rt.query(index::intersects(box1) && !index::within(box2),
+ std::back_inserter(result));
+
+ rt.query(index::intersects(box1) && !index::within(box2) && index::overlaps(box3),
+ std::back_inserter(result));
+
+Of course it's possible to connect different types of predicates together.
+
+ rt.query(index::nearest(index::bounded(pt, index::to_furthest(1), 10)) && index::intersects(b), returned_value);
+
+ index::query(rt, index::nearest(pt, k) && index::within(b), std::back_inserter(returned_values));
+
+ BOOST_FOREACH(Value & v, rt | index::adaptors::queried(index::nearest(pt, k) && index::covered_by(b)))
+ ; // do something with v
+
+[endsect]
+
+[section Inserting query results into the other R-tree]
+
+There are several ways of inserting Values returned by a query to the other R-tree container.
+The most basic way is creating a temporary container for Values and insert them later.
+
+ namespace bgi = boost::geometry::index;
+ typedef std::pair<Box, int> __value__;
+ typedef bgi::rtree< __value__, bgi::linear<32, 8> > RTree;
+
+ RTree rt1;
+ /* some inserting into the tree */
+
+ std::vector<Value> result;
+ rt1.query(Box(/*...*/), std::back_inserter(result));
+ RTree rt2(result.begin(), result.end());
+
+However there are better ways. One of these methods is mentioned in the "Creation and modification" section.
+The insert iterator may be passed directly to the query, which will be the fastest way of inserting
+query results because temporary container won't be used.
+
+ RTree rt3;
+ rt1.query(Box(/*...*/), bgi::inserter(rt3));
+
+If you like Boost.Range you'll appreciate the third option. You may pass the result Range directly to the
+constructor. However in this case the temporary container is created.
+
+ RTree rt4(rt1 | bgi::adaptors::queried(Box(/*...*/)));
+
+[endsect]
+
+[endsect] [/ Queries /]

Deleted: sandbox-branches/geometry/index/doc/rtree/spatial_query.qbk
==============================================================================
--- sandbox-branches/geometry/index/doc/rtree/spatial_query.qbk 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
+++ (empty file)
@@ -1,142 +0,0 @@
-[/============================================================================
- Boost.Geometry Index
-
- Copyright (c) 2011-2012 Adam Wulkiewicz.
-
- 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)
-=============================================================================/]
-
-[section Spatial queries]
-
-Spatial queries returns `Value`s which meets some predicates. For instance it may be used to
-retrieve Values intersecting some area or are within some other area. Names of predicates
-corresponds to names of __boost_geometry__ algorithms. The examples of some
-basic queries may be found in tables below. The query region and result `Value`s are orange.
-
-[table
-[[intersects(Box) - default] [covered_by(Box)] [disjoint(Box)] [overlaps(Box)] [within(Box)]]
-[[[$../images/intersects.png]] [[$../images/within.png]] [[$../images/disjoint.png]] [[$../images/overlaps.png]] [[$../images/within.png]]]
-]
-
-[table
-[[intersects(Ring)] [intersects(Polygon)] [intersects(MultiPolygon)]]
-[[[$../images/intersects_ring.png]] [[$../images/intersects_poly.png]] [[$../images/intersects_mpoly.png]]]
-]
-
-[section Basic queries]
-
-There are three ways to perform a spatial query. Following queries returns
-`__value__`s intersecting some region defined as a box in this example.
-
-Method call
-
- std::vector<__value__> returned_values;
- __box__ box_region(...);
- rt.spatial_query(box_region, std::back_inserter(returned_values));
-
-Function call
-
- std::vector<__value__> returned_values;
- __box__ box_region(...);
- index::spatial_query(rt, box_region, std::back_inserter(returned_values));
-
-Use of pipe operator generating a range
-
- __box__ box_region(...);
- BOOST_FOREACH(__value__ & v, rt | index::adaptors::spatial_queried(box_region))
- ; // do something with v
-[endsect]
-
-[section Spatial predicates]
-
-To explicitly define one of the predicates one may pass it to the `spatial_query()` as
-the first argument.
-
- rt.spatial_query(box, std::back_inserter(result)); // default case - intersects
- rt.spatial_query(index::intersects(box), std::back_inserter(result)); // the same as default
- rt.spatial_query(index::covered_by(box), std::back_inserter(result));
- rt.spatial_query(index::disjont(box), std::back_inserter(result));
- rt.spatial_query(index::overlaps(box), std::back_inserter(result));
- rt.spatial_query(index::within(box), std::back_inserter(result));
-
-All predicates may be negated, e.g.:
-
- rt.spatial_query(!index::intersects(box), std::back_inserter(result));
- // the same as
- rt.spatial_query(index::disjoint(box), std::back_inserter(result));
-
-[endsect]
-
-[section Connecting predicates]
-
-It's possible to use some number of predicates in one time by passing `std::pair<Pred1, Pred2>`
-or `boost::tuple<Pred1, Pred2, Pred3, ...>`. These predicates are connected by logical AND.
-Passing all predicates together not only makes possible to construct advanced queries but is also
-faster than separate calls because the tree is traversed only once. Traversing is continued and
-`Value`s are returned only if all predicates are met. Predicates are checked left-to-right so placing
-most restictive predicates first should accelerate the search.
-
- rt.spatial_query(
- std::make_pair(
- index::intersects(box1), !index::within(box2) ),
- std::back_inserter(result));
-
- rt.spatial_query(
- boost::make_tuple(
- index::intersects(box1), !index::within(box2), index::overlaps(box3) ),
- std::back_inserter(result));
-
-[endsect]
-
-[section Value predicate]
-
-There is also a unique predicate `index::value(...)` taking user-defined function/functor
-which checks if `__value__` should be returned by the query.
-
- bool fun(__value__ const& v)
- {
- return v.is_red();
- }
-
- // ...
-
- rt.spatial_query(
- boost::make_pair(
- index::intersects(box), index::value(fun) ),
- std::back_inserter(result));
-
-[endsect]
-
-[section Inserting query results into the other R-tree]
-
-There are several ways of inserting Values returned by a query to the other R-tree container.
-The most basic way is creating a temporary container for Values and insert them later.
-
- namespace bgi = boost::geometry::index;
- typedef std::pair<Box, int> __value__;
- typedef bgi::rtree< __value__, bgi::linear<32, 8> > RTree;
-
- RTree rt1;
- /* some inserting into the tree */
-
- std::vector<Value> result;
- rt1.spatial_query(Box(/*...*/), std::back_inserter(result));
- RTree rt2(result.begin(), result.end());
-
-However there are better ways. One of these methods is mentioned in the "Creation and modification" section.
-The insert iterator may be passed directly to the query, which will be the fastest way of inserting
-query results because temporary container won't be used.
-
- RTree rt3;
- rt1.spatial_query(Box(/*...*/), bgi::inserter(rt3));
-
-If you like Boost.Range you'll appreciate the third option. You may pass the result Range directly to the
-constructor.
-
- RTree rt4(rt1 | bgi::adaptors::spatial_queried(Box(/*...*/)));
-
-[endsect]
-
-[endsect] [/ Spatial queries /]

Modified: sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp
==============================================================================
--- sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp (original)
+++ sandbox-branches/geometry/index/doc/src/examples/rtree/quick_start.cpp 2013-01-25 20:27:59 EST (Fri, 25 Jan 2013)
@@ -55,13 +55,13 @@
     // find values intersecting some area defined by a box
     box query_box(point(0, 0), point(5, 5));
     std::vector<value> result_s;
- rtree.spatial_query(query_box, std::back_inserter(result_s));
+ rtree.query(query_box, std::back_inserter(result_s));
     //]
 
     //[rtree_quickstart_nearest_query
     // find 5 nearest values to a point
     std::vector<value> result_n;
- rtree.nearest_query(point(0, 0), 5, std::back_inserter(result_n));
+ rtree.query(bgi::nearest(point(0, 0), 5), std::back_inserter(result_n));
     //]
 
     //[rtree_quickstart_output


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