mirror of
https://github.com/boostorg/geometry.git
synced 2025-05-11 13:34:10 +00:00
geometry.index docs: experimental features commented, sections replaced by headings in queries description
[SVN r84296]
This commit is contained in:
parent
82b4c79441
commit
4a59810947
@ -57,8 +57,6 @@
|
|||||||
and Modification</a></span></dt>
|
and Modification</a></span></dt>
|
||||||
<dt><span class="section"><a href="geometry/spatial_indexes/queries.html">Queries</a></span></dt>
|
<dt><span class="section"><a href="geometry/spatial_indexes/queries.html">Queries</a></span></dt>
|
||||||
<dt><span class="section"><a href="geometry/spatial_indexes/rtree_examples.html">Examples</a></span></dt>
|
<dt><span class="section"><a href="geometry/spatial_indexes/rtree_examples.html">Examples</a></span></dt>
|
||||||
<dt><span class="section"><a href="geometry/spatial_indexes/experimental_features.html">Experimental
|
|
||||||
Features</a></span></dt>
|
|
||||||
</dl></dd>
|
</dl></dd>
|
||||||
<dt><span class="section"><a href="geometry/reference.html">Reference</a></span></dt>
|
<dt><span class="section"><a href="geometry/reference.html">Reference</a></span></dt>
|
||||||
<dd><dl>
|
<dd><dl>
|
||||||
@ -111,7 +109,7 @@
|
|||||||
</ul></div>
|
</ul></div>
|
||||||
</div>
|
</div>
|
||||||
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
|
||||||
<td align="left"><p><small>Last revised: May 13, 2013 at 00:36:10 GMT</small></p></td>
|
<td align="left"><p><small>Last revised: May 16, 2013 at 10:14:50 GMT</small></p></td>
|
||||||
<td align="right"><div class="copyright-footer"></div></td>
|
<td align="right"><div class="copyright-footer"></div></td>
|
||||||
</tr></table>
|
</tr></table>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -40,4 +40,4 @@
|
|||||||
[include rtree/creation.qbk]
|
[include rtree/creation.qbk]
|
||||||
[include rtree/query.qbk]
|
[include rtree/query.qbk]
|
||||||
[include rtree/examples.qbk]
|
[include rtree/examples.qbk]
|
||||||
[include rtree/experimental.qbk]
|
[/include rtree/experimental.qbk]
|
||||||
|
@ -33,14 +33,15 @@ a relation object instead of a Point to the nearest predicate, as follows:
|
|||||||
|
|
||||||
[heading Path query]
|
[heading Path query]
|
||||||
|
|
||||||
Path query returns `k` first `__value__`s intersecting a path defined by a `Linestring`. The result of a query returning first 5
|
Path query returns `k` first `__value__`s intersecting a path defined by a `Segment` or a`Linestring`. The result of a query returning first 5
|
||||||
values intersecting a path is presented below. Path's flow is denoted by blue arrows, returned values are orange.
|
values intersecting a path is presented below. Path's flow is denoted by blue arrows, returned values are orange.
|
||||||
|
|
||||||
[$img/index/rtree/path.png]
|
[$img/index/rtree/path.png]
|
||||||
|
|
||||||
To perform this query one may pass a `path()` predicate taking a `Linestring` and maximum number of `__value__`s which
|
To perform this query one may pass a `path()` predicate taking a `Segment` or a `Linestring` and maximum number of `__value__`s which
|
||||||
should be returned:
|
should be returned:
|
||||||
|
|
||||||
|
rtree.query(index::path(segment, k), std::back_inserter(returned_values));
|
||||||
rtree.query(index::path(linestring, k), std::back_inserter(returned_values));
|
rtree.query(index::path(linestring, k), std::back_inserter(returned_values));
|
||||||
|
|
||||||
[warning Only one distance predicate may be used in a query. This means that there can be only one `nearest()` or `path()` predicate passed. Passing more of them will result in compile-time error.]
|
[warning Only one distance predicate may be used in a query. This means that there can be only one `nearest()` or `path()` predicate passed. Passing more of them will result in compile-time error.]
|
||||||
|
@ -22,7 +22,7 @@ For example queries may be used to retrieve Values:
|
|||||||
* are nearest to some point,
|
* are nearest to some point,
|
||||||
* overlapping a box and has user-defined property.
|
* overlapping a box and has user-defined property.
|
||||||
|
|
||||||
[section Performing a query]
|
[h4 Performing a query]
|
||||||
|
|
||||||
There are three ways to perform a query presented below. All of them returns `__value__`s intersecting some
|
There are three ways to perform a query presented below. All of them returns `__value__`s intersecting some
|
||||||
region defined as a `__box__`.
|
region defined as a `__box__`.
|
||||||
@ -45,9 +45,7 @@ Use of pipe operator generating a range
|
|||||||
BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(bgi::intersects(box_region)))
|
BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(bgi::intersects(box_region)))
|
||||||
; // do something with v
|
; // do something with v
|
||||||
|
|
||||||
[endsect]
|
[h4 Spatial predicates]
|
||||||
|
|
||||||
[section Spatial predicates]
|
|
||||||
|
|
||||||
Queries using spatial predicates returns `__value__`s which are related somehow to some Geometry - box, polygon, etc.
|
Queries using spatial predicates returns `__value__`s which are related somehow to some Geometry - box, polygon, etc.
|
||||||
Names of spatial predicates correspond to names of __boost_geometry__ algorithms. Examples of some
|
Names of spatial predicates correspond to names of __boost_geometry__ algorithms. Examples of some
|
||||||
@ -77,11 +75,9 @@ All spatial predicates may be negated, e.g.:
|
|||||||
// the same as
|
// the same as
|
||||||
rt.query(index::disjoint(box), std::back_inserter(result));
|
rt.query(index::disjoint(box), std::back_inserter(result));
|
||||||
|
|
||||||
[endsect]
|
[h4 Distance predicates]
|
||||||
|
|
||||||
[section Distance predicates]
|
[h5 Nearest neighbours queries]
|
||||||
|
|
||||||
[h4 Nearest neighbours queries]
|
|
||||||
|
|
||||||
Nearest neighbours queries returns `__value__`s which are closest to some point in space.
|
Nearest neighbours queries returns `__value__`s which are closest to some point in space.
|
||||||
Additionally it is possible to define how the distance to the `Value` should be calculated.
|
Additionally it is possible to define how the distance to the `Value` should be calculated.
|
||||||
@ -89,7 +85,7 @@ The example of knn query is presented below. 5 `__value__`s nearest to some poin
|
|||||||
|
|
||||||
[$img/index/rtree/knn.png]
|
[$img/index/rtree/knn.png]
|
||||||
|
|
||||||
[h4 k nearest neighbours]
|
[h5 k nearest neighbours]
|
||||||
|
|
||||||
There are three ways of performing knn queries. Following queries returns
|
There are three ways of performing knn queries. Following queries returns
|
||||||
`k` `__value__`s closest to some point in space. For `__box__`es
|
`k` `__value__`s closest to some point in space. For `__box__`es
|
||||||
@ -113,9 +109,7 @@ Use of `operator |`
|
|||||||
BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(index::nearest(pt, k)))
|
BOOST_FOREACH(__value__ & v, rt | index::adaptors::queried(index::nearest(pt, k)))
|
||||||
; // do something with v
|
; // do something with v
|
||||||
|
|
||||||
[endsect]
|
[h4 User-defined unary predicate]
|
||||||
|
|
||||||
[section User-defined unary predicate]
|
|
||||||
|
|
||||||
The user may pass a `UnaryPredicate` - function, function object or lambda expression taking const reference to Value and returning bool.
|
The user may pass a `UnaryPredicate` - function, function object or lambda expression taking const reference to Value and returning bool.
|
||||||
This object may be passed to the query in order to check if `__value__` should be returned by the query. To do it one
|
This object may be passed to the query in order to check if `__value__` should be returned by the query. To do it one
|
||||||
@ -161,9 +155,7 @@ may use `index::satisfies()` function like on the example below:
|
|||||||
rt.query(index::intersects(box) && !index::satisfies(is_not_red),
|
rt.query(index::intersects(box) && !index::satisfies(is_not_red),
|
||||||
std::back_inserter(result));
|
std::back_inserter(result));
|
||||||
|
|
||||||
[endsect]
|
[h4 Passing a set of predicates]
|
||||||
|
|
||||||
[section Passing a set of predicates]
|
|
||||||
|
|
||||||
It's possible to use some number of predicates in one query by connecting them with `operator&&` e.g. `Pred1 && Pred2 && Pred3 && ...`.
|
It's possible to use some number of predicates in one query by connecting them with `operator&&` e.g. `Pred1 && Pred2 && Pred3 && ...`.
|
||||||
|
|
||||||
@ -185,9 +177,7 @@ Of course it's possible to connect different types of predicates together.
|
|||||||
BOOST_FOREACH(Value & v, rt | index::adaptors::queried(index::nearest(pt, k) && index::covered_by(b)))
|
BOOST_FOREACH(Value & v, rt | index::adaptors::queried(index::nearest(pt, k) && index::covered_by(b)))
|
||||||
; // do something with v
|
; // do something with v
|
||||||
|
|
||||||
[endsect]
|
[h4 Inserting query results into the other R-tree]
|
||||||
|
|
||||||
[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.
|
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.
|
The most basic way is creating a temporary container for Values and insert them later.
|
||||||
@ -214,6 +204,4 @@ constructor.
|
|||||||
|
|
||||||
RTree rt4(rt1 | bgi::adaptors::queried(bgi::intersects(Box(/*...*/)))));
|
RTree rt4(rt1 | bgi::adaptors::queried(bgi::intersects(Box(/*...*/)))));
|
||||||
|
|
||||||
[endsect]
|
|
||||||
|
|
||||||
[endsect] [/ Queries /]
|
[endsect] [/ Queries /]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user