[/ Generated by doxygen_xml2qbk, don't change, will be overwritten automatically] [/ Generated from xml/group__rtree__functions.xml] [section:group__rtree__functions Functions related to the rtree] [heading Functions] [table [[Function][Description]] [[[link group__rtree__functions_1gada4f62111ed22eb2860ea30995c1ce60 `insert(rtree<...> &, Value const &)`]][Insert a value to the index. ]] [[[link group__rtree__functions_1ga056469ea699e609e67762fe1b789997f `insert(rtree<...> &, Iterator, Iterator)`]][Insert a range of values to the index. ]] [[[link group__rtree__functions_1ga524e332717347c3ffb54d2497047215b `insert(rtree<...> &, Range const &)`]][Insert a range of values to the index. ]] [[[link group__rtree__functions_1gaf353d90fd933e6110b031f63166fb45a `remove(rtree<...> &, Value const &)`]][Remove a value from the container. ]] [[[link group__rtree__functions_1gaa460a8985496cf133f63f245527ac6e7 `remove(rtree<...> &, Iterator, Iterator)`]][Remove a range of values from the container. ]] [[[link group__rtree__functions_1ga421f4fe0554d1b436b9e7e64794e6349 `remove(rtree<...> &, Range const &)`]][Remove a range of values from the container. ]] [[[link group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95 `query(rtree<...> const &, Predicates const &, OutIter)`]][Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. ]] [[[link group__rtree__functions_1gabaca6c24c3838a8164aa3700c459e7a4 `clear(rtree<...> &)`]][Remove all values from the index. ]] [[[link group__rtree__functions_1gaa19a09e7b5f0a86a4b74ef2342de1d68 `size(rtree<...> const &)`]][Get the number of values stored in the index. ]] [[[link group__rtree__functions_1gaba44e2fb12fdc7b528bfee56a88e0844 `empty(rtree<...> const &)`]][Query if there are no values stored in the index. ]] [[[link group__rtree__functions_1ga4e43e7720c66e88959ff511a7462a3ff `bounds(rtree<...> const &)`]][Get the box containing all stored values or an invalid box if the index has no values. ]] [[[link group__rtree__functions_1gaa1250318a78d7e27ba8f3537eb0ddb3f `swap(rtree<...> &, rtree<...> &)`]][Exchanges the contents of the container with those of other. ]] ] [#group__rtree__functions_1gada4f62111ed22eb2860ea30995c1ce60] [section insert(rtree<...> &, Value const &)] Insert a value to the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1ad47980467e66b8644df18a480dbf9d86 rtree::insert(value_type const&)]].[heading Synopsis] [pre `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``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Value const &`][ `v` ][The value which will be stored in the index. ]] ] [endsect] [#group__rtree__functions_1ga056469ea699e609e67762fe1b789997f] [section insert(rtree<...> &, Iterator, Iterator)] Insert a range of values to the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a60d4c8790fd8810ff8b57f049e6bed8d rtree::insert(Iterator, Iterator)]].[heading Synopsis] [pre `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``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Iterator`][ `first` ][The beginning of the range of values. ]] [[`Iterator`][ `last` ][The end of the range of values. ]] ] [endsect] [#group__rtree__functions_1ga524e332717347c3ffb54d2497047215b] [section insert(rtree<...> &, Range const &)] Insert a range of values to the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a39be117f85cc9ebc508d8ecf77578329 rtree::insert(Range const&)]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``,` `typename Range``>` `void boost::geometry::index::insert``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Range const &` `rng``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Range const &`][ `rng` ][The range of values. ]] ] [endsect] [#group__rtree__functions_1gaf353d90fd933e6110b031f63166fb45a] [section remove(rtree<...> &, Value const &)] Remove a value from the container. [heading Description] 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 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a1ce933b0b833faec5349bfc27bde15d4 rtree::remove(value_type const&)]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``>` `rtree::size_type boost::geometry::index::remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Value const &` `v``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Value const &`][ `v` ][The value which will be removed from the index.]] ] [heading Returns] 1 if value was removed, 0 otherwise. [endsect] [#group__rtree__functions_1gaa460a8985496cf133f63f245527ac6e7] [section remove(rtree<...> &, Iterator, Iterator)] Remove a range of values from the container. [heading Description] 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 [^[link classboost_1_1geometry_1_1index_1_1rtree_1aa97084231d17564a94f0142d095cecaa rtree::remove(Iterator, Iterator)]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``,` `typename Iterator``>` `rtree::size_type boost::geometry::index::remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Iterator` `first``,` `Iterator` `last``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Iterator`][ `first` ][The beginning of the range of values. ]] [[`Iterator`][ `last` ][The end of the range of values.]] ] [heading Returns] The number of removed values. [endsect] [#group__rtree__functions_1ga421f4fe0554d1b436b9e7e64794e6349] [section remove(rtree<...> &, Range const &)] Remove a range of values from the container. [heading Description] Remove 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 [^[link classboost_1_1geometry_1_1index_1_1rtree_1a8a6460c186f595e91be69b1062ecae8b rtree::remove(Range const&)]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``,` `typename Range``>` `rtree::size_type boost::geometry::index::remove``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``,` `Range const &` `rng``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] [[`Range const &`][ `rng` ][The range of values.]] ] [heading Returns] The number of removed values. [endsect] [#group__rtree__functions_1gadb43b211d5d743ebe2ef256328286e95] [section query(rtree<...> const &, Predicates const &, OutIter)] Finds values meeting passed predicates e.g. nearest to some Point and/or intersecting some Box. [heading Description] This query function performs spatial and k-nearest neighbor searches. It allows to pass a set of predicates. Values will be returned only if all predicates are met. [*Spatial predicates] Spatial predicates may be generated by one of the functions listed below: * [^[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]], * [^[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]], * [^[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]], * [^[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]], * [^[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]], It is possible to negate spatial predicates: * [^`! `[link group__predicates_1ga0a613a7f1d18ac33955bfdc2c5777c61 boost::geometry::index::covered_by()]], * [^`! `[link group__predicates_1ga351bb3b82e019ff45adf789385b8007d boost::geometry::index::disjoint()]], * [^`! `[link group__predicates_1ga7301c50e0272976b9f1434536383e6d0 boost::geometry::index::intersects()]], * [^`! `[link group__predicates_1ga5511236f56be1defcccbf11e742ccd88 boost::geometry::index::overlaps()]], * [^`! `[link group__predicates_1gabf9c4e76dd8a09a4c476f2f8fa8a0e4d boost::geometry::index::within()]] [*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: * [^[link group__predicates_1gae7e9291c5b99041fb155d29de0860bab boost::geometry::index::satisfies()]]. [*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: * [^[link group__predicates_1gae80a2c204673a8b11c4fc137cfff6556 boost::geometry::index::nearest()]]. [*Connecting predicates] Predicates may be passed together connected with [^`operator&&()`].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``,` `typename Predicates``,` `typename OutIter``>` `rtree::size_type boost::geometry::index::query``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``,` `Predicates const &` `predicates``,` `OutIter` `out_it``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The rtree. ]] [[`Predicates const &`][ `predicates` ][Predicates. ]] [[`OutIter`][ `out_it` ][The output iterator, e.g. generated by std::back_inserter().]] ] [heading Returns] The number of values found. [heading Example] `` // 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)); // return 5 elements which centroids are nearest to pt and elements aren't within box bgi::query(tree, bgi::nearest(bgi::to_centroid(pt), 5) && !bgi::within(box), std::back_inserter(result)); `` [heading Throws] If Value copy constructor or copy assignment throws. [warning Only one [^[link group__predicates_1gae80a2c204673a8b11c4fc137cfff6556 nearest()]] perdicate may be passed to the query.] [endsect] [#group__rtree__functions_1gabaca6c24c3838a8164aa3700c459e7a4] [section clear(rtree<...> &)] Remove all values from the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1a1bec40977c175983f585c4488cf8fe3c rtree::clear()]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``>` `void boost::geometry::index::clear``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &` `tree``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `tree` ][The spatial index. ]] ] [endsect] [#group__rtree__functions_1gaa19a09e7b5f0a86a4b74ef2342de1d68] [section size(rtree<...> const &)] Get the number of values stored in the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1ac9f152c8c96525e3735b81635d8171b1 rtree::size()]].[heading Synopsis] [pre `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``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]] ] [heading Returns] The number of values stored in the index. [endsect] [#group__rtree__functions_1gaba44e2fb12fdc7b528bfee56a88e0844] [section empty(rtree<...> const &)] Query if there are no values stored in the index. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1aa5302ce1c26105d722aac20793e83f0e rtree::empty()]].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``>` `bool boost::geometry::index::empty``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]] ] [heading Returns] true if there are no values in the index. [endsect] [#group__rtree__functions_1ga4e43e7720c66e88959ff511a7462a3ff] [section bounds(rtree<...> const &)] Get the box containing all stored values or an invalid box if the index has no values. [heading Description] It calls [^`rtree::envelope()`].[heading Synopsis] [pre `template<``typename Value``,` `typename Parameters``,` `typename IndexableGetter``,` `typename EqualTo``,` `typename Allocator``>` `rtree::bounds_type boost::geometry::index::bounds``(``rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &` `tree``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > const &`][ `tree` ][The spatial index.]] ] [heading Returns] The box containing all stored values or an invalid box. [endsect] [#group__rtree__functions_1gaa1250318a78d7e27ba8f3537eb0ddb3f] [section swap(rtree<...> &, rtree<...> &)] Exchanges the contents of the container with those of other. [heading Description] It calls [^[link classboost_1_1geometry_1_1index_1_1rtree_1aedb719dfece91d298e9ee56878524c9b rtree::swap()]].[heading Synopsis] [pre `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``)` ] [heading Parameter(s)] [table [[Type][Name][Description]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `l` ][The first rtree. ]] [[`rtree< Value, Parameters, IndexableGetter, EqualTo, Allocator > &`][ `r` ][The second rtree. ]] ] [endsect] [endsect]