Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84820 - in trunk/libs/geometry: doc/index index/test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2013-06-17 18:23:36


Author: awulkiew
Date: 2013-06-17 18:23:35 EDT (Mon, 17 Jun 2013)
New Revision: 84820
URL: http://svn.boost.org/trac/boost/changeset/84820

Log:
[geometry][index] docs: planned and experimental features section modified, test: added tests for experimental reversed spatial predicates.

Text files modified:
   trunk/libs/geometry/doc/index/introduction.qbk | 14 +++++++-------
   trunk/libs/geometry/index/test/rtree/test_rtree.hpp | 36 ++++++++++++++++++++++++++++++++++++
   2 files changed, 43 insertions(+), 7 deletions(-)

Modified: trunk/libs/geometry/doc/index/introduction.qbk
==============================================================================
--- trunk/libs/geometry/doc/index/introduction.qbk Mon Jun 17 18:21:13 2013 (r84819)
+++ trunk/libs/geometry/doc/index/introduction.qbk 2013-06-17 18:23:35 EDT (Mon, 17 Jun 2013) (r84820)
@@ -76,22 +76,22 @@
 * three different balancing algorithms - linear, quadratic or rstar,
 * parameters (including maximal and minimal number of elements) may be passed as compile- or run-time parameters, in compile-time
   version nodes elements are stored in static-size containers,
-* advanced queries - e.g. search for 5 nearest values to some point and intersecting some region but not within the other one,
+* advanced queries - e.g. search for 5 nearest Values to some point and intersecting some Geometry but not within the other one,
 * C++11 conformant: move semantics, stateful allocators,
 * capable to store __value__ type with no default constructor,
 * in-memory storage (shared memory by use of Boost.Interprocess allocator).
 
-[heading Planned features]
+[heading Planned and experimental features]
 
 Below you can find features that will (or probably will) be added in the future releases:
 
-* rstar optimization (implemented, planned for release in Boost 1.55)
-* bulk loading (implemented, planned for release in Boost 1.55)
-* iterative queries - query iterators / type-erased query iterators (implemented as experimental feature)
-* path/ray query predicate - search for Values along Segment or LineString, closest to the starting point (implemented as experimental feature),
+* rstar optimization (planned for release in Boost 1.55),
+* bulk loading (planned for release in Boost 1.55),
+* iterative queries - query iterators / type-erased query iterators (experimental),
+* path/ray query predicate - search for Values along Segment or LineString, closest to the starting point (experimental),
+* 'reversed' spatial predicates - e.g. allows searching not only for Values within some Geometry but also those which contain some Geometry (experimental),
 * persistent storage.
 [/
-* 'reversed' predicates - e.g. by use of operator~() - predicates applied to passed Geometry instead of Value
 * other geometries as Values, e.g. NSpheres. Rings would probably require using move semantics instead of copying
 * bounding tree - rtree variation capable to use other Geometries as bounds, e.g. NSpheres, Rings/convex polygons/ (moving required), Capsules, Elipses, Variants etc.
 * moving instead of copying + optimizations for movable/nonthrowing/trivialy copied elements

Modified: trunk/libs/geometry/index/test/rtree/test_rtree.hpp
==============================================================================
--- trunk/libs/geometry/index/test/rtree/test_rtree.hpp Mon Jun 17 18:21:13 2013 (r84819)
+++ trunk/libs/geometry/index/test/rtree/test_rtree.hpp 2013-06-17 18:23:35 EDT (Mon, 17 Jun 2013) (r84820)
@@ -702,6 +702,12 @@
     spatial_query(tree, bgi::intersects(qbox), expected_output);
     spatial_query(tree, !bgi::disjoint(qbox), expected_output);
 
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ spatial_query(tree, ~bgi::intersects(qbox), expected_output);
+ spatial_query(tree, !~bgi::disjoint(qbox), expected_output);
+ spatial_query(tree, ~!bgi::disjoint(qbox), expected_output);
+#endif
+
     /*typedef bg::traits::point_type<Box>::type P;
     bg::model::ring<P> qring;
     bg::convert(qbox, qring);
@@ -725,6 +731,12 @@
     spatial_query(tree, bgi::disjoint(qbox), expected_output);
     spatial_query(tree, !bgi::intersects(qbox), expected_output);
 
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ spatial_query(tree, ~bgi::disjoint(qbox), expected_output);
+ spatial_query(tree, !~bgi::intersects(qbox), expected_output);
+ spatial_query(tree, ~!bgi::intersects(qbox), expected_output);
+#endif
+
     /*typedef bg::traits::point_type<Box>::type P;
     bg::model::ring<P> qring;
     bg::convert(qbox, qring);
@@ -746,6 +758,16 @@
 
     spatial_query(tree, bgi::covered_by(qbox), expected_output);
 
+// TODO - run this only for Boxes
+//#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+// expected_output.clear();
+// BOOST_FOREACH(Value const& v, input)
+// if ( bg::covered_by(qbox, tree.indexable_get()(v)) )
+// expected_output.push_back(v);
+//
+// spatial_query(tree, ~bgi::covered_by(qbox), expected_output);
+//#endif
+
     /*typedef bg::traits::point_type<Box>::type P;
     bg::model::ring<P> qring;
     bg::convert(qbox, qring);
@@ -769,6 +791,10 @@
 
         spatial_query(tree, bgi::overlaps(qbox), expected_output);
 
+#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+ spatial_query(tree, ~bgi::overlaps(qbox), expected_output);
+#endif
+
         /*typedef bg::traits::point_type<Box>::type P;
         bg::model::ring<P> qring;
         bg::convert(qbox, qring);
@@ -841,6 +867,16 @@
 
     spatial_query(tree, bgi::within(qbox), expected_output);
 
+// TODO - run this only for Boxes
+//#ifdef BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL
+// expected_output.clear();
+// BOOST_FOREACH(Value const& v, input)
+// if ( bg::within(qbox, tree.indexable_get()(v)) )
+// expected_output.push_back(v);
+//
+// spatial_query(tree, ~bgi::within(qbox), expected_output);
+//#endif
+
     /*typedef bg::traits::point_type<Box>::type P;
     bg::model::ring<P> qring;
     bg::convert(qbox, qring);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk