From 73e797440874aefd5c10a504dcb3cf70df2279fe Mon Sep 17 00:00:00 2001 From: Adam Wulkiewicz Date: Sun, 25 Nov 2012 21:26:00 +0000 Subject: [PATCH] Added basic description and images of spatial and knn queries [SVN r81540] --- .../geometry_index/r_tree/introduction.html | 2 +- .../r_tree/nearest_neighbours_queries.html | 49 +++++++++++++ .../r_tree/spatial_queries.html | 70 +++++++++++++++++++ doc/html/index.html | 2 +- doc/rtree/introduction.qbk | 6 +- doc/rtree/nearest_query.qbk | 11 +++ doc/rtree/spatial_query.qbk | 9 +++ 7 files changed, 144 insertions(+), 5 deletions(-) diff --git a/doc/html/geometry_index/r_tree/introduction.html b/doc/html/geometry_index/r_tree/introduction.html index d86263e93..22f3d92c0 100644 --- a/doc/html/geometry_index/r_tree/introduction.html +++ b/doc/html/geometry_index/r_tree/introduction.html @@ -201,7 +201,7 @@

[1] Guttman, A. (1984). R-Trees: A Dynamic Index Structure for Spatial - Searching footnote + Searching

[2] Greene, D. (1989). An implementation and performance analysis diff --git a/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html b/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html index 6a2482203..497577ccc 100644 --- a/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html +++ b/doc/html/geometry_index/r_tree/nearest_neighbours_queries.html @@ -37,6 +37,55 @@

Using spatial predicates
+

+ Nearest neighbours queries returns Values + which are closest to some point in space. Additionally it is possible to + pass distance predicates in order to define how the distance to the Value should be calculated or minimal and + maximal distances. The examples of some knn queries may be found in the table + below. All queries returns 5 closest Values. + The query point, region and result Values are orange. +

+
+++++ + + + + + + + + + + +
+

+ Basic knn query +

+
+

+ knn in a ring (Value's furthest point) +

+
+

+ knn in a ring (Value's closest point) +

+
+

+ knn +

+
+

+ knn_inters +

+
+

+ knn_cover +

+
+

+ Spatial queries returns Values + which meets some predicates. For instance it may be used to retrieve Values + intersecting some area or are within some other area. The examples of some + basic queries may be found in the table below. The query region and result + Values are orange. +

+
+++++++ + + + + + + + + + + + + + + +
+

+ intersects (default) +

+
+

+ covered_by +

+
+

+ disjoint +

+
+

+ overlaps +

+
+

+ within +

+
+

+ intersects +

+
+

+ within +

+
+

+ disjoint +

+
+

+ overlaps +

+
+

+ within +

+
- +

Last revised: November 25, 2012 at 20:52:29 GMT

Last revised: November 25, 2012 at 21:23:52 GMT


diff --git a/doc/rtree/introduction.qbk b/doc/rtree/introduction.qbk index 95e13a022..9ac62a7db 100644 --- a/doc/rtree/introduction.qbk +++ b/doc/rtree/introduction.qbk @@ -11,7 +11,7 @@ [section Introduction] __rtree__ is a tree data structure used for spatial searching. It was proposed by -Antonin Guttman in 1984 [footnote Guttman, A. (1984). /R-Trees: A Dynamic Index Structure for Spatial Searching/ footnote] +Antonin Guttman in 1984 [footnote Guttman, A. (1984). /R-Trees: A Dynamic Index Structure for Spatial Searching/] as an expansion of B-tree for multi-dimensional data. It may be used to store points or volumetric data in order to perform a spatial query later. This query may return objects that are inside some area or are close to some point in space. @@ -26,8 +26,8 @@ the new node is created and elements are split between nodes. If the number of e and elements are reinserted into the tree. The __rtree__ is a self-balanced data structure. The key part of balancing algorithm is node splitting algorithm mentioned before -[footnote Greene, D. (1989). /An implementation and performance analysis of spatial data access methods/ ] -[footnote Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). /The R*-tree: an efficient and robust access method for points and rectangles/ ]. +[footnote Greene, D. (1989). /An implementation and performance analysis of spatial data access methods/] +[footnote Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). /The R*-tree: an efficient and robust access method for points and rectangles/]. Each algorithm would produce different splits so the internal structure of a tree may be different for each one of them. In general more complex algorithms analyses elements better and produces less overlapping nodes. This is a "better" split because later, in the searching process less nodes must be traversed in order to find desired obejcts. On the other hand more complex analysis diff --git a/doc/rtree/nearest_query.qbk b/doc/rtree/nearest_query.qbk index d5eb85748..d3ba7fc69 100644 --- a/doc/rtree/nearest_query.qbk +++ b/doc/rtree/nearest_query.qbk @@ -10,6 +10,17 @@ [section Nearest neighbours queries] +Nearest neighbours queries returns `Value`s which are closest to some point in space. +Additionally it is possible to pass distance predicates in order to define how the distance +to the `Value` should be calculated or minimal and maximal distances. The examples of some knn +queries may be found in the table below. All queries returns 5 closest `Values`. +The query point, region and result Values are orange. + +[table +[[Basic knn query] [knn in a ring (Value's furthest point)] [knn in a ring (Value's closest point)]] +[[[$../images/knn.png]] [[$../images/knn_inters.png]] [[$../images/knn_cover.png]]] +] + [section k nearest neighbours] There are three ways of performing knn queries. Following queries returns diff --git a/doc/rtree/spatial_query.qbk b/doc/rtree/spatial_query.qbk index 6013a73fc..198c56b15 100644 --- a/doc/rtree/spatial_query.qbk +++ b/doc/rtree/spatial_query.qbk @@ -10,6 +10,15 @@ [section Spatial queries] +Spatial queries returns `Value`s which meets some predicates. For instance it may be used to +retrieve Values intersecting some area or are within some other area. The examples of some +basic queries may be found in the table below. The query region and result `Value`s are orange. + +[table +[[intersects (default)] [covered_by] [disjoint] [overlaps] [within]] +[[[$../images/intersects.png]] [[$../images/within.png]] [[$../images/disjoint.png]] [[$../images/overlaps.png]] [[$../images/within.png]]] +] + [section Basic queries] There are three ways to perform a spatial query. Following queries returns