326 lines
11 KiB
Plaintext
326 lines
11 KiB
Plaintext
[/ Generated by doxygen_xml2qbk 1.1.1, don't change, will be overwritten automatically]
|
|
[/ Generated from xml/group__predicates.xml]
|
|
[section:group__predicates Predicates (boost::geometry::index::)]
|
|
[heading Functions]
|
|
[table
|
|
[[Function][Description]]
|
|
[[[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 `contains(Geometry const &)`]][Generate [^[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 contains()]] predicate. ]]
|
|
[[[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 `covered_by(Geometry const &)`]][Generate [^[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 covered_by()]] predicate. ]]
|
|
[[[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 `covers(Geometry const &)`]][Generate [^[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 covers()]] predicate. ]]
|
|
[[[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da `disjoint(Geometry const &)`]][Generate [^[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da disjoint()]] predicate. ]]
|
|
[[[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 `intersects(Geometry const &)`]][Generate [^[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 intersects()]] predicate. ]]
|
|
[[[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b `overlaps(Geometry const &)`]][Generate [^[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b overlaps()]] predicate. ]]
|
|
[[[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 `within(Geometry const &)`]][Generate [^[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 within()]] predicate. ]]
|
|
[[[link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c `satisfies(UnaryPredicate const &)`]][Generate [link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c satisfies()] predicate. ]]
|
|
[[[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e `nearest(Geometry const &, unsigned)`]][Generate [link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()] predicate. ]]
|
|
]
|
|
|
|
[#group__predicates_1gac52a6557110425d4ece53fbd6f9ff866]
|
|
[section contains(Geometry const &)]
|
|
'''<indexterm><primary>contains</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1gac52a6557110425d4ece53fbd6f9ff866 contains()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::within(Geometry, Indexable)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `contains``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::contains(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga02dbb7cca47de0b921ef96af464d9590]
|
|
[section covered_by(Geometry const &)]
|
|
'''<indexterm><primary>covered_by</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1ga02dbb7cca47de0b921ef96af464d9590 covered_by()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::covered_by(Indexable, Geometry)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `covered_by``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::covered_by(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga0e92e4a20dd19185584fe85847439108]
|
|
[section covers(Geometry const &)]
|
|
'''<indexterm><primary>covers</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1ga0e92e4a20dd19185584fe85847439108 covers()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::covered_by(Geometry, Indexable)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `covers``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::covers(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da]
|
|
[section disjoint(Geometry const &)]
|
|
'''<indexterm><primary>disjoint</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1ga0aa114ab16f40c8caeb3338adba5d6da disjoint()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::disjoint(Indexable, Geometry)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `disjoint``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::disjoint(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5]
|
|
[section intersects(Geometry const &)]
|
|
'''<indexterm><primary>intersects</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1ga78cb2ef221b951867c591ffb51b7d8c5 intersects()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::intersects(Indexable, Geometry)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `intersects``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::intersects(box), std::back_inserter(result));
|
|
bgi::query(spatial_index, bgi::intersects(ring), std::back_inserter(result));
|
|
bgi::query(spatial_index, bgi::intersects(polygon), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b]
|
|
[section overlaps(Geometry const &)]
|
|
'''<indexterm><primary>overlaps</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1ga4a6d33e6f61ad5bff3bdee50a972d54b overlaps()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::overlaps(Indexable, Geometry)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `overlaps``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::overlaps(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5]
|
|
[section within(Geometry const &)]
|
|
'''<indexterm><primary>within</primary></indexterm>'''
|
|
Generate [^[link group__predicates_1gaabce901b82af2aab10ebbd0dda12f4d5 within()]] predicate.
|
|
|
|
[heading Description]
|
|
Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if [^`bg::within(Indexable, Geometry)`] returns true.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `within``(``Geometry const &` `g``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`Geometry`][The Geometry type.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `g` ][The Geometry object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::within(box), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c]
|
|
[section satisfies(UnaryPredicate const &)]
|
|
'''<indexterm><primary>satisfies</primary></indexterm>'''
|
|
Generate [link group__predicates_1ga3213772dd3e54ad03340c2ca66b4f58c satisfies()] predicate.
|
|
|
|
[heading Description]
|
|
A wrapper around user-defined UnaryPredicate checking if Value should be returned by spatial query.[heading Synopsis]
|
|
[pre
|
|
`template<``typename UnaryPredicate``>`
|
|
/unspecified/ `satisfies``(``UnaryPredicate const &` `pred``)`
|
|
]
|
|
|
|
[heading Template parameter(s)]
|
|
[table
|
|
[[Parameter] [Description]]
|
|
[[`UnaryPredicate`][A type of unary predicate function or function object.]]
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`UnaryPredicate const &`][ `pred` ][The unary predicate function or function object. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bool is_red(Value const& v) { return v.is_red(); }
|
|
|
|
struct is_red_o {
|
|
template <typename Value> bool operator()(Value const& v) { return v.is_red(); }
|
|
}
|
|
|
|
// ...
|
|
|
|
rt.query(index::intersects(box) && index::satisfies(is_red),
|
|
std::back_inserter(result));
|
|
|
|
rt.query(index::intersects(box) && index::satisfies(is_red_o()),
|
|
std::back_inserter(result));
|
|
|
|
#ifndef BOOST_NO_CXX11_LAMBDAS
|
|
rt.query(index::intersects(box) && index::satisfies([](Value const& v) { return v.is_red(); }),
|
|
std::back_inserter(result));
|
|
#endif
|
|
``
|
|
|
|
|
|
[endsect]
|
|
|
|
[#group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e]
|
|
[section nearest(Geometry const &, unsigned)]
|
|
'''<indexterm><primary>nearest</primary></indexterm>'''
|
|
Generate [link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()] predicate.
|
|
|
|
[heading Description]
|
|
When nearest predicate is passed to the query, k-nearest neighbour search will be performed. [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()]] predicate takes a [^`Geometry`] from which distances to [^`Values`] are calculated and the maximum number of [^`Values`] that should be returned. Internally boost::geometry::comparable_distance() is used to perform the calculation.[heading Synopsis]
|
|
[pre
|
|
`template<``typename Geometry``>`
|
|
/unspecified/ `nearest``(``Geometry const &` `geometry``,` `unsigned` `k``)`
|
|
]
|
|
|
|
[heading Parameter(s)]
|
|
[table
|
|
[[Type][Name][Description]]
|
|
[[`Geometry const &`][ `geometry` ][The geometry from which distance is calculated. ]]
|
|
[[`unsigned`][ `k` ][The maximum number of values to return. ]]
|
|
]
|
|
[heading Example]
|
|
|
|
``
|
|
bgi::query(spatial_index, bgi::nearest(pt, 5), std::back_inserter(result));
|
|
bgi::query(spatial_index, bgi::nearest(pt, 5) && bgi::intersects(box), std::back_inserter(result));
|
|
bgi::query(spatial_index, bgi::nearest(box, 5), std::back_inserter(result));
|
|
``
|
|
|
|
|
|
[warning Only one [^[link group__predicates_1ga8772d9d3e5b12b3292f7d94d47310e3e nearest()]] predicate may be used in a query.]
|
|
|
|
[endsect]
|
|
|
|
[endsect]
|
|
|