Functions | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
void | boost::geometry::index::insert (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, Value const &v) |
Insert a value to the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename Iterator > | |
void | boost::geometry::index::insert (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, Iterator first, Iterator last) |
Insert a range of values to the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename ConvertibleOrRange > | |
void | boost::geometry::index::insert (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, ConvertibleOrRange const &conv_or_rng) |
Insert a value created using convertible object or a range of values to the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type | boost::geometry::index::remove (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, Value const &v) |
Remove a value from the container. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename Iterator > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type | boost::geometry::index::remove (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, Iterator first, Iterator last) |
Remove a range of values from the container. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename ConvertibleOrRange > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type | boost::geometry::index::remove (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree, ConvertibleOrRange const &conv_or_rng) |
Remove a value corresponding to an object convertible to it or a range of values from the container. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename Predicates , typename OutIter > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size_type | boost::geometry::index::query (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree, Predicates const &predicates, OutIter out_it) |
Finds values meeting passed predicates e.g. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator , typename Predicates > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > ::const_query_iterator | boost::geometry::index::qbegin (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree, Predicates const &predicates) |
Returns the query iterator pointing at the begin of the query range. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > ::const_query_iterator | boost::geometry::index::qend (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree) |
Returns the query iterator pointing at the end of the query range. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
void | boost::geometry::index::clear (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &tree) |
Remove all values from the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
size_t | boost::geometry::index::size (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree) |
Get the number of values stored in the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
bool | boost::geometry::index::empty (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree) |
Query if there are no values stored in the index. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::bounds_type | boost::geometry::index::bounds (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &tree) |
Get the box containing all stored values or an invalid box if the index has no values. More... | |
template<typename Value , typename Parameters , typename IndexableGetter , typename EqualTo , typename Allocator > | |
void | boost::geometry::index::swap (rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &l, rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &r) |
Exchanges the contents of the container with those of other. More... | |
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Get the box containing all stored values or an invalid box if the index has no values.
It calls rtree::envelope()
.
tree | The spatial index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::bounds().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Remove all values from the index.
It calls rtree::clear()
.
tree | The spatial index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::clear().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Query if there are no values stored in the index.
It calls rtree::empty()
.
tree | The spatial index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::bounds().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Insert a value to the index.
It calls rtree::insert(value_type const&)
.
tree | The spatial index. |
v | The value which will be stored in the index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::insert().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Insert a range of values to the index.
It calls rtree::insert(Iterator, Iterator)
.
tree | The spatial index. |
first | The beginning of the range of values. |
last | The end of the range of values. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::insert().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Insert a value created using convertible object or a range of values to the index.
It calls rtree::insert(ConvertibleOrRange const&)
.
tree | The spatial index. |
conv_or_rng | The object of type convertible to value_type or a range of values. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::insert().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Returns the query iterator pointing at the begin of the query range.
This method returns the iterator which may be used to perform iterative queries. For the information about the predicates which may be passed to this method see query().
for ( Rtree::const_query_iterator it = qbegin(tree, bgi::nearest(pt, 10000)) ; it != qend(tree) ; ++it ) { // do something with value if ( has_enough_nearest_values() ) break; }
tree | The rtree. |
predicates | Predicates. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::qbegin().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Returns the query iterator pointing at the end of the query range.
This method returns the iterator which may be used to check if the query has ended.
for ( Rtree::const_query_iterator it = qbegin(tree, bgi::nearest(pt, 10000)) ; it != qend(tree) ; ++it ) { // do something with value if ( has_enough_nearest_values() ) break; }
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::qend().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Finds values meeting passed predicates e.g.
nearest to some Point and/or intersecting some Box.
This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates. Values will be returned only if all predicates are met.
Spatial predicates
Spatial predicates may be generated by one of the functions listed below:
boost::geometry::index::contains()
, boost::geometry::index::covered_by()
, boost::geometry::index::covers()
, boost::geometry::index::disjoint()
, boost::geometry::index::intersects()
, boost::geometry::index::overlaps()
, boost::geometry::index::within()
,It is possible to negate spatial predicates:
! boost::geometry::index::contains()
, ! boost::geometry::index::covered_by()
, ! boost::geometry::index::covers()
, ! boost::geometry::index::disjoint()
, ! boost::geometry::index::intersects()
, ! boost::geometry::index::overlaps()
, ! boost::geometry::index::within()
Satisfies predicate
This is a special kind of predicate which allows to pass a user-defined function or function object which checks if Value should be returned by the query. It's generated by:
Nearest predicate
If the nearest predicate is passed a k-nearest neighbor search will be performed. This query will result in returning k values to the output iterator. Only one nearest predicate may be passed to the query. It may be generated by:
Connecting predicates
Predicates may be passed together connected with operator&&()
.
// return elements intersecting box bgi::query(tree, bgi::intersects(box), std::back_inserter(result)); // return elements intersecting poly but not within box bgi::query(tree, bgi::intersects(poly) && !bgi::within(box), std::back_inserter(result)); // return elements overlapping box and meeting my_fun value predicate bgi::query(tree, bgi::overlaps(box) && bgi::satisfies(my_fun), std::back_inserter(result)); // return 5 elements nearest to pt and elements are intersecting box bgi::query(tree, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
nearest()
perdicate may be passed to the query. Passing more of them results in compile-time error.tree | The rtree. |
predicates | Predicates. |
out_it | The output iterator, e.g. generated by std::back_inserter(). |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::query().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Remove a value from the container.
Remove a value from the container. In contrast to the std::set
or std::map erase()
method this function removes only one value from the container.
It calls rtree::remove(value_type const&)
.
tree | The spatial index. |
v | The value which will be removed from the index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::remove().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Remove a range of values from the container.
Remove a range of values from the container. In contrast to the std::set
or std::map erase()
method it doesn't take iterators pointing to values stored in this container. It removes values equal to these passed as a range. Furthermore this function removes only one value for each one passed in the range, not all equal values.
It calls rtree::remove(Iterator, Iterator)
.
tree | The spatial index. |
first | The beginning of the range of values. |
last | The end of the range of values. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::remove().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Remove a value corresponding to an object convertible to it or a range of values from the container.
Remove a value corresponding to an object convertible to it or a range of values from the container. In contrast to the std::set
or std::map erase()
method it removes values equal to these passed as a range. Furthermore this method removes only one value for each one passed in the range, not all equal values.
It calls rtree::remove(ConvertibleOrRange const&)
.
tree | The spatial index. |
conv_or_rng | The object of type convertible to value_type or the range of values. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::remove().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Get the number of values stored in the index.
It calls rtree::size()
.
tree | The spatial index. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::size().
|
inline |
#include <boost_1_57_0/boost/geometry/index/rtree.hpp>
Exchanges the contents of the container with those of other.
It calls rtree::swap()
.
l | The first rtree. |
r | The second rtree. |
References boost::geometry::index::rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator >::swap().