Added spatial and distance predicates to the reference.

[SVN r82413]
This commit is contained in:
Adam Wulkiewicz
2013-01-08 23:41:27 +00:00
parent a127e0eb70
commit 54a789ec78
10 changed files with 1593 additions and 152 deletions

View File

@@ -665,7 +665,8 @@ WARN_LOGFILE =
# directories like "/usr/src/myproject". Separate the files or directories
# with spaces.
INPUT = ../boost/geometry/extensions/index/rtree/rtree.hpp
INPUT = ../boost/geometry/extensions/index/ \
../boost/geometry/extensions/index/rtree
# This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is

View File

@@ -77,8 +77,12 @@
<dt><span class="section"><a href="r_tree/reference.html">Reference</a></span></dt>
<dd><dl>
<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.boost_geometry_index_rtree">boost::geometry::index::rtree</a></span></dt>
<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__rtree__group">boost::geometry::index::rtree
- global functions</a></span></dt>
<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__rtree__functions">Functions
related to the rtree (boost::geometry::index::)</a></span></dt>
<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__predicates">Predicates
(boost::geometry::index::)</a></span></dt>
<dt><span class="section"><a href="r_tree/reference.html#geometry_index.r_tree.reference.group__distance__predicates">Distance
predicates (boost::geometry::index::)</a></span></dt>
</dl></dd>
</dl></div>
</div>

File diff suppressed because it is too large Load Diff

View File

@@ -56,7 +56,7 @@
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: January 08, 2013 at 23:01:28 GMT</small></p></td>
<td align="left"><p><small>Last revised: January 08, 2013 at 23:37:30 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td>
</tr></table>
<hr>

View File

@@ -19,6 +19,8 @@ cmd = cmd + " > generated/%s.qbk"
os.system("doxygen Doxyfile")
os.system(cmd % ("classboost_1_1geometry_1_1index_1_1rtree", "geometry_index.r_tree.reference", "rtree"))
os.system(cmd % ("group__rtree__group", "geometry_index.r_tree.reference", "rtree_group"))
os.system(cmd % ("group__rtree__functions", "geometry_index.r_tree.reference", "rtree_functions"))
os.system(cmd % ("group__predicates", "geometry_index.r_tree.reference", "predicates"))
os.system(cmd % ("group__distance__predicates", "geometry_index.r_tree.reference", "distance_predicates"))
os.system("b2")

View File

@@ -20,7 +20,9 @@
[section:reference Reference]
[include generated/rtree.qbk]
[include generated/rtree_group.qbk]
[include generated/rtree_functions.qbk]
[include generated/predicates.qbk]
[include generated/distance_predicates.qbk]
[endsect]

View File

@@ -813,7 +813,7 @@ void quickbook_output_alt(documentation const& doc, configuration const& config,
if ( !doc.group_id.empty() )
{
id_prefix = doc.group_id + ".function";
std::cout << "[section:" << doc.group_id << " " << doc.group_title << " - global functions]" << std::endl;
std::cout << "[section:" << doc.group_id << " " << doc.group_title << "]" << std::endl;
}
quickbook_output_function(doc.functions, function_constructor_destructor, config, id_prefix, out, true);

View File

@@ -17,6 +17,10 @@
#include <boost/geometry/extensions/index/tuples.hpp>
/*!
\defgroup distance_predicates Distance predicates (boost::geometry::index::)
*/
namespace boost { namespace geometry { namespace index {
//TODO: awulkiew - consider storing values instead of const references
@@ -102,6 +106,8 @@ struct relation< to_furthest<T> >
// relations generators
/*!
\brief Generate to_nearest() Point-Indexable relationship.
Generate a nearest query Point and Value's Indexable relationship while calculating
distances. This function may be used to define that knn query should calculate distances
as smallest as possible between query Point and Indexable's points. In other words it
@@ -109,6 +115,8 @@ should be the distance to the nearest Indexable's point. This function may be al
to define distances bounds which indicates that Indexable's nearest point should be
closer or further than value v. This is default relation.
\ingroup distance_predicates
\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
MinRelation or MaxRelation
@@ -121,12 +129,16 @@ detail::to_nearest<T> to_nearest(T const& v)
}
/*!
\brief Generate to_centroid() Point-Indexable relationship.
Generate a nearest query Point and Value's Indexable relationship while calculating
distances. This function may be used to define that knn query should calculate distances
between query Point and Indexable's centroid. This function may be also used
to define distances bounds which indicates that Indexable's centroid should be
closer or further than value v.
\ingroup distance_predicates
\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
MinRelation or MaxRelation
@@ -139,6 +151,8 @@ detail::to_centroid<T> to_centroid(T const& v)
}
/*!
\brief Generate to_furthest() Point-Indexable relationship.
Generate a nearest query Point and Value's Indexable relationship while calculating
distances. This function may be used to define that knn query should calculate distances
as biggest as possible between query Point and Indexable's points. In other words it
@@ -146,6 +160,8 @@ should be the distance to the furthest Indexable's point. This function may be a
to define distances bounds which indicates that Indexable's furthest point should be
closer or further than value v.
\ingroup distance_predicates
\tparam T Type of wrapped object. This may be a Point for PointRelation or some Value for
MinRelation or MaxRelation
@@ -237,11 +253,15 @@ struct bounded
// distance predicates generators
/*!
\brief Generate unbounded() distance predicate.
Generate a distance predicate. This defines distances bounds which are used by knn query.
This function indicates that there is no distance bounds and Values should be returned
if distances between Point and Indexable are the smallest. Distance calculation is defined
by PointRelation. This is default nearest predicate.
\ingroup distance_predicates
\tparam PointRelation PointRelation type.
\param pr The point relation. This may be generated by bgi::to_nearest(Point),
@@ -255,12 +275,16 @@ unbounded(PointRelation const& pr)
}
/*!
\brief Generate min_bounded() distance predicate.
Generate a distance predicate. This defines distances bounds which are used by knn query.
This function indicates that Values should be returned only if distances between Point and
Indexable are greater or equal to some min_distance passed in MinRelation. Check for closest Value is
defined by PointRelation. So it is possible e.g. to return Values with centroids closest to some
Point but only if nearest points are further than some distance.
\ingroup distance_predicates
\tparam PointRelation PointRelation type.
\tparam MinRelation MinRelation type.
@@ -277,12 +301,16 @@ min_bounded(PointRelation const& pr, MinRelation const& minr)
}
/*!
\brief Generate max_bounded() distance predicate.
Generate a distance predicate. This defines distances bounds which are used by knn query.
This function indicates that Values should be returned only if distances between Point and
Indexable are lesser or equal to some max_distance passed in MaxRelation. Check for closest Value is
defined by PointRelation. So it is possible e.g. to return Values with centroids closest to some
Point but only if nearest points are closer than some distance.
\ingroup distance_predicates
\tparam PointRelation PointRelation type.
\tparam MaxRelation MaxRelation type.
@@ -299,6 +327,8 @@ max_bounded(PointRelation const& pr, MaxRelation const& maxr)
}
/*!
\brief Generate bounded() distance predicate.
Generate a distance predicate. This defines distances bounds which are used by knn query.
This function indicates that Values should be returned only if distances between Point and
Indexable are greater or equal to some min_distance passed in MinRelation and lesser or equal to
@@ -306,6 +336,8 @@ some max_distance passed in MaxRelation. Check for closest Value is defined by P
So it is possible e.g. to return Values with centroids closest to some Point but only if nearest
points are further than some distance and closer than some other distance.
\ingroup distance_predicates
\tparam PointRelation PointRelation type.
\tparam MinRelation MinRelation type.
\tparam MaxRelation MaxRelation type.

View File

@@ -18,6 +18,10 @@
// TODO: awulkiew - temporary
#include <boost/geometry/algorithms/covered_by.hpp>
/*!
\defgroup predicates Predicates (boost::geometry::index::)
*/
namespace boost { namespace geometry { namespace index {
namespace detail {
@@ -122,7 +126,9 @@ struct not_within
// generators
/*!
Generate empty predicate.
\brief Generate empty predicate.
\ingroup predicates
*/
inline detail::empty empty()
{
@@ -130,9 +136,13 @@ inline detail::empty empty()
}
/*!
Generate value predicate. A wrapper around user-defined functor
\brief Generate value predicate.
A wrapper around user-defined functor
describing if Value should be returned by spatial query.
\ingroup predicates
\tparam ValuePredicate Functor type.
\param vpred The functor.
@@ -144,10 +154,14 @@ inline detail::value<ValuePredicate> value(ValuePredicate const& vpred)
}
/*!
\brief 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.
\ingroup predicates
\tparam Geometry The Geometry type.
\param g The Geometry object.
@@ -159,10 +173,14 @@ inline detail::covered_by<Geometry> covered_by(Geometry const& g)
}
/*!
\brief 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.
\ingroup predicates
\tparam Geometry The Geometry type.
\param g The Geometry object.
@@ -174,10 +192,14 @@ inline detail::disjoint<Geometry> disjoint(Geometry const& g)
}
/*!
\brief 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.
\ingroup predicates
\tparam Geometry The Geometry type.
\param g The Geometry object.
@@ -189,10 +211,14 @@ inline detail::intersects<Geometry> intersects(Geometry const& g)
}
/*!
\brief 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.
\ingroup predicates
\tparam Geometry The Geometry type.
\param g The Geometry object.
@@ -204,10 +230,14 @@ inline detail::overlaps<Geometry> overlaps(Geometry const& g)
}
//*!
//\brief Generate touches() predicate.
//
//Generate a predicate defining Value and Geometry relationship.
//Value will be returned by the query if bg::touches(Indexable, Geometry)
//returns true.
//
//\ingroup predicates
//
//\tparam Geometry The Geometry type.
//
//\param g The Geometry object.
@@ -219,10 +249,14 @@ inline detail::overlaps<Geometry> overlaps(Geometry const& g)
//}
/*!
\brief 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.
\ingroup predicates
\tparam Geometry The Geometry type.
\param g The Geometry object.

View File

@@ -50,12 +50,12 @@
// TODO change the name to bounding_tree
namespace boost { namespace geometry { namespace index {
/*!
\defgroup rtree_group boost::geometry::index::rtree
\defgroup rtree_functions Functions related to the rtree (boost::geometry::index::)
*/
namespace boost { namespace geometry { namespace index {
/*!
\brief The R-tree spatial index.
@@ -81,8 +81,6 @@ or Box concepts (which are Indexables). It also handles std::pair<Indexable, T>,
and iterators. E.g. If std::pair<Box, int> is stored, the default translator translates from
std::pair<Box, int> const& to Box const&.
\ingroup rtree_group
\tparam Value The type of objects stored in the container.
\tparam Parameters Compile-time parameters.
\tparam Translator The type of the translator which translates from Value to Indexable.
@@ -1160,7 +1158,7 @@ private:
/*!
\brief Insert a value to the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param v The value which will be stored in the index.
@@ -1174,7 +1172,7 @@ inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Value co
/*!
\brief Insert a range of values to the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param first The beginning of the range of values.
@@ -1189,7 +1187,7 @@ inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Iterator
/*!
\brief Insert a range of values to the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param rng The range of values.
@@ -1206,7 +1204,7 @@ inline void insert(rtree<Value, Options, Translator, Allocator> & tree, Range co
Remove a value from the container. In contrast to the STL set/map erase() method
this function removes only one value from the container.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param v The value which will be removed from the index.
@@ -1228,7 +1226,7 @@ it doesn't take iterators pointing to values stored in this container. It remove
to these passed as a range. Furthermore this function removes only one value for each one passed
in the range, not all equal values.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param first The beginning of the range of values.
@@ -1250,7 +1248,7 @@ Remove a range of values from the container. In contrast to the STL set/map eras
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.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param rng The range of values.
@@ -1267,7 +1265,7 @@ remove(rtree<Value, Options, Translator, Allocator> & tree, Range const& rng)
/*!
\brief Find values meeting spatial predicates.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param pred The spatial predicates.
@@ -1284,7 +1282,7 @@ inline size_t spatial_query(rtree<Value, Options, Translator, Allocator> const&
/*!
\brief Find the value meeting distances predicates.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param dpred The distances predicates.
@@ -1301,7 +1299,7 @@ inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const&
/*!
\brief Find the value meeting distances and spatial predicates.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param dpred The distances predicates.
@@ -1319,7 +1317,7 @@ inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const&
/*!
\brief Find k values meeting distances predicates.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param dpred The distances predicates.
@@ -1337,7 +1335,7 @@ inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const&
/*!
\brief Find k values meeting distances and spatial predicates.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
\param dpred The distances predicates.
@@ -1356,7 +1354,7 @@ inline size_t nearest_query(rtree<Value, Options, Translator, Allocator> const&
/*!
\brief Remove all values from the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
*/
@@ -1369,7 +1367,7 @@ inline void clear(rtree<Value, Options, Translator, Allocator> & tree)
/*!
\brief Get the number of values stored in the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
@@ -1384,7 +1382,7 @@ inline size_t size(rtree<Value, Options, Translator, Allocator> const& tree)
/*!
\brief Query if there are no values stored in the index.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.
@@ -1399,7 +1397,7 @@ inline bool empty(rtree<Value, Options, Translator, Allocator> const& tree)
/*!
\brief Get the box containing all stored values or an invalid box if the index has no values.
\ingroup rtree_group
\ingroup rtree_functions
\param tree The spatial index.