diff --git a/doc/html/index.html b/doc/html/index.html index ae1ad02c5..3e4d34b68 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -31,7 +31,7 @@
Copyright © 2008 Federico J. Fernandez
Copyright © 2011 Adam Wulkiewicz
Use, modification and distribution is subject to the Boost +
Use, modification and distribution is subject to the Boost
Software License, Version 1.0. (See accompanying file
LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
R-tree is a self-balancing search tree with nodes stored with their axis aligned bounding boxes. Each node's box describes the space occupied by children nodes. @@ -40,9 +41,42 @@ At the bottom of the structure, there are leaf-nodes which contains values (geometric objects representations). Minimal and maximal numbers of values/children which may be stored inside the node are user defined.
++In order to use the R-tree one must include folowing file. +
++#include <boost/geometry/extensions/index/rtree/rtree.hpp> ++
+
+
+In order to create a R-tree object storing values of type
+std::pair<Box, int> one may use the following code
+
+using namespace boost::geometry; +typedef std::pair<Box, int> Value; +index::rtree< Value, index::quadratic<32, 8> > rt; ++
+
+-
-In order to create a R-tree object storing values of type
-std::pair<Box, int> one may use the following code
-
-using namespace boost::geometry; -typedef std::pair<Box, int> Value; -index::rtree< Value, index::quadratic<32, 8> > rt; --
-
R-tree may store Values of any type as long as there is passed
the Translator which knows how to interpret those Values
@@ -112,8 +135,8 @@ Examples of Value types:
Values may be inserted to the R-tree in many various ways. Final structure of nodes depends
on algorithms used in the process, especially nodes' splitting algorithm. Currently, three
@@ -142,9 +165,10 @@ index::rtree< Value, index::rstar<32, 8> > rt;
Create
@@ -174,7 +198,14 @@ index::remove(rt, v); + +
There are three ways to perform a spatial query. Following queries returns
Values intersecting some box_region.
@@ -209,8 +240,8 @@ BOOST_FOREACH(Value &v, rt | index::query_filtered(box_region))
It is possible to define other relations between queried Values and region/regions
of interest. Names of predicates corresponds to names of Boost.Geometry algorithms.
@@ -268,18 +299,19 @@ rt.query(
There are three ways of performing knn queries. Following queries returns
k Values closest to some point in space. For Boxes
@@ -316,7 +348,7 @@ BOOST_FOREACH(Value &v, rt | index::nearest_filtered(pt, k))
Another type of nearest neighbor query is searching for the one closest Value.
If it is found, 1 is returned by the method or function. This kind of query
@@ -345,7 +377,7 @@ size_t n = index::nearest(rt, pt, returned_value);
It is possible to define if calculated distance between query point and Value should be
greater, lesser or between some other distances. Those are called DistancesPredicates and
@@ -402,9 +434,9 @@ index::nearest(rt, index::min_bounded(pt, index::centroid(10)), k, std::back_ins
-It is possible to use spatial predicates described before in knn queries. +It is possible to use spatial predicates described before in nearest neighbors queries.
Value returned_value; diff --git a/doc/index.xml b/doc/index.xml index 722e2c286..f41b06921 100644 --- a/doc/index.xml +++ b/doc/index.xml @@ -48,6 +48,9 @@ occupying some space or close to some point in space.R-tree + ++ +Introduction R-tree is a self-balancing search tree with nodes stored with their axis aligned bounding boxes. Each node's box describes the space occupied by children nodes. @@ -56,8 +59,32 @@ At the bottom of the structure, there are leaf-nodes which contains values which may be stored inside the node are user defined. ++In order to use the R-tree one must include folowing file. + ++#include <boost/geometry/extensions/index/rtree/rtree.hpp> + ++ R-tree creation + ++ + +Quick start ++In order to create a R-tree object storing values of type + +std::pair<Box, int>one may use the following code ++using namespace boost::geometry; +typedef std::pair<Box, int> Value; +index::rtree< Value, index::quadratic<32, 8> > rt; + ++ R-tree template parameters R-tree has 4 parameters: -@@ -81,15 +108,6 @@ R-tree can handle. -In order to create a R-tree object storing values of type - std::pair<Box, int>one may use the following code --using namespace boost::geometry; -typedef std::pair<Box, int> Value; -index::rtree< Value, index::quadratic<32, 8> > rt; - -@@ -146,6 +164,8 @@ index::rtree< Value, index::rstar<32, 8> > rt; +Inserting and removing Values @@ -172,6 +192,9 @@ index::remove(rt, v); + Spatial queries + ++ +Basic queries There are three ways to perform a spatial query. Following queries returns Values intersecting some box_region. @@ -254,6 +277,8 @@ rt.query(Nearest neighbors queries @@ -378,7 +403,7 @@ index::nearest(rt, index::min_bounded(pt, index::centroid(10)), k, std::back_insUsing spatial predicates -It is possible to use spatial predicates described before in knn queries. +It is possible to use spatial predicates described before in nearest neighbors queries. Value returned_value; std::vector<Value> returned_values;