Boost  v1.57.0
doxygen for www.boost.org
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Predicates (boost::geometry::index::)

Functions

template<typename Geometry >
detail::spatial_predicate
< Geometry,
detail::contains_tag, false > 
boost::geometry::index::contains (Geometry const &g)
 Generate contains() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry,
detail::covered_by_tag, false > 
boost::geometry::index::covered_by (Geometry const &g)
 Generate covered_by() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry, detail::covers_tag,
false > 
boost::geometry::index::covers (Geometry const &g)
 Generate covers() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry,
detail::disjoint_tag, false > 
boost::geometry::index::disjoint (Geometry const &g)
 Generate disjoint() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry,
detail::intersects_tag, false > 
boost::geometry::index::intersects (Geometry const &g)
 Generate intersects() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry,
detail::overlaps_tag, false > 
boost::geometry::index::overlaps (Geometry const &g)
 Generate overlaps() predicate. More...
 
template<typename Geometry >
detail::spatial_predicate
< Geometry, detail::within_tag,
false > 
boost::geometry::index::within (Geometry const &g)
 Generate within() predicate. More...
 
template<typename UnaryPredicate >
detail::satisfies
< UnaryPredicate, false > 
boost::geometry::index::satisfies (UnaryPredicate const &pred)
 Generate satisfies() predicate. More...
 
template<typename Geometry >
detail::nearest< Geometry > boost::geometry::index::nearest (Geometry const &geometry, unsigned k)
 Generate nearest() predicate. More...
 

Detailed Description

Function Documentation

template<typename Geometry >
detail::spatial_predicate<Geometry, detail::contains_tag, false> boost::geometry::index::contains ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate contains() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::within(Geometry, Indexable) returns true.

Example
bgi::query(spatial_index, bgi::contains(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.
template<typename Geometry >
detail::spatial_predicate<Geometry, detail::covered_by_tag, false> boost::geometry::index::covered_by ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate covered_by() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::covered_by(Indexable, Geometry) returns true.

Example
bgi::query(spatial_index, bgi::covered_by(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.
template<typename Geometry >
detail::spatial_predicate<Geometry, detail::covers_tag, false> boost::geometry::index::covers ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate covers() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::covered_by(Geometry, Indexable) returns true.

Example
bgi::query(spatial_index, bgi::covers(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.
template<typename Geometry >
detail::spatial_predicate<Geometry, detail::disjoint_tag, false> boost::geometry::index::disjoint ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate disjoint() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::disjoint(Indexable, Geometry) returns true.

Example
bgi::query(spatial_index, bgi::disjoint(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.

Referenced by boost::geometry::strategy::intersection::relate_cartesian_segments< Policy, CalculationType >::apply(), boost::geometry::detail::wkt::wkt_range< Range, opening_parenthesis, closing_parenthesis >::apply(), boost::geometry::detail::correct::correct_ring< Ring, std::less< default_area_result< Ring >::type > >::apply(), boost::geometry::policies::relate::segments_tupled< Policy1, Policy2 >::disjoint(), and boost::geometry::intersects().

template<typename Geometry >
detail::spatial_predicate<Geometry, detail::intersects_tag, false> boost::geometry::index::intersects ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate intersects() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::intersects(Indexable, Geometry) returns true.

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));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.
template<typename Geometry >
detail::nearest<Geometry> boost::geometry::index::nearest ( Geometry const &  geometry,
unsigned  k 
)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate nearest() predicate.

When nearest predicate is passed to the query, k-nearest neighbour search will be performed. 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.

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 nearest() predicate may be used in a query.
Parameters
geometryThe geometry from which distance is calculated.
kThe maximum number of values to return.
template<typename Geometry >
detail::spatial_predicate<Geometry, detail::overlaps_tag, false> boost::geometry::index::overlaps ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate overlaps() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::overlaps(Indexable, Geometry) returns true.

Example
bgi::query(spatial_index, bgi::overlaps(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.
template<typename UnaryPredicate >
detail::satisfies<UnaryPredicate, false> boost::geometry::index::satisfies ( UnaryPredicate const &  pred)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate satisfies() predicate.

A wrapper around user-defined UnaryPredicate checking if Value should be returned by spatial query.

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
Template Parameters
UnaryPredicateA type of unary predicate function or function object.
Parameters
predThe unary predicate function or function object.
template<typename Geometry >
detail::spatial_predicate<Geometry, detail::within_tag, false> boost::geometry::index::within ( Geometry const &  g)
inline

#include <boost_1_57_0/boost/geometry/index/predicates.hpp>

Generate within() predicate.

Generate a predicate defining Value and Geometry relationship. Value will be returned by the query if bg::within(Indexable, Geometry) returns true.

Example
bgi::query(spatial_index, bgi::within(box), std::back_inserter(result));
Template Parameters
GeometryThe Geometry type.
Parameters
gThe Geometry object.