Files
geometry/doc/rtree/quickstart.qbk
2012-08-23 21:55:34 +00:00

48 lines
1.5 KiB
Plaintext

[/============================================================================
Boost.Geometry Index
Copyright (c) 2011-2012 Adam Wulkiewicz.
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)
=============================================================================/]
[section:rtree_quickstart Quick Start]
This Quick Start section shows simple way to creating a typical R-tree and perform
spatial query.
The code below assumes that following files are included and namespaces used.
[rtree_quickstart_include]
It is possible to store user-defined types in the R-tree. To keep it simple we will
use predefined __point__ and __box__.
[rtree_quickstart_valuetype]
R-tree may be created using various algorithm and parameters. In this example we will
use quadratic algorithm. Maximum number of elements in nodes are set to 32, minimum to 8.
[rtree_quickstart_create]
Inserting values into the R-tree may be done by calling insert() method.
[rtree_quickstart_insert]
There are various types of queries that may be performed, they can be even combined together
in one call. For simplicity, default one is used.
[rtree_quickstart_query]
Default k-nearest neighbors query may be performed as follows.
[rtree_quickstart_nearest]
[h3 More]
More information about the R-tree implementation, other algorithms and queries may be found in
other parts of this documentation.
[endsect]