Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80148 - sandbox-branches/geometry/index/test/rtree
From: adam.wulkiewicz_at_[hidden]
Date: 2012-08-22 18:16:39


Author: awulkiew
Date: 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
New Revision: 80148
URL: http://svn.boost.org/trac/boost/changeset/80148

Log:
added r-tree basic knn search test, gcc compilation errors fixed, *.cpp test files divided to more smaller files.
Added:
   sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp (contents, props changed)
   sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp (contents, props changed)
Removed:
   sandbox-branches/geometry/index/test/rtree/rtree2d_linear.cpp
   sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic.cpp
   sandbox-branches/geometry/index/test/rtree/rtree2d_rstar.cpp
   sandbox-branches/geometry/index/test/rtree/rtree3d_linear.cpp
   sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic.cpp
   sandbox-branches/geometry/index/test/rtree/rtree3d_rstar.cpp
Text files modified:
   sandbox-branches/geometry/index/test/rtree/Jamfile.v2 | 35 +++++++-
   sandbox-branches/geometry/index/test/rtree/test_rtree.hpp | 146 ++++++++++++++++++++++++++++++++++++++-
   2 files changed, 171 insertions(+), 10 deletions(-)

Modified: sandbox-branches/geometry/index/test/rtree/Jamfile.v2
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/Jamfile.v2 (original)
+++ sandbox-branches/geometry/index/test/rtree/Jamfile.v2 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -11,11 +11,34 @@
 
 test-suite boost-geometry-index-rtree
     :
- [ run rtree2d_linear.cpp ]
- [ run rtree2d_quadratic.cpp ]
- [ run rtree2d_rstar.cpp ]
- [ run rtree3d_linear.cpp ]
- [ run rtree3d_quadratic.cpp ]
- [ run rtree3d_rstar.cpp ]
+ [ run rtree2d_linear_i.cpp ]
+ [ run rtree2d_linear_f.cpp ]
+ [ run rtree2d_linear_d.cpp ]
+ [ run rtree2d_linear_tt.cpp ]
+
+ [ run rtree2d_quadratic_i.cpp ]
+ [ run rtree2d_quadratic_f.cpp ]
+ [ run rtree2d_quadratic_d.cpp ]
+ [ run rtree2d_quadratic_tt.cpp ]
+
+ [ run rtree2d_rstar_i.cpp ]
+ [ run rtree2d_rstar_f.cpp ]
+ [ run rtree2d_rstar_d.cpp ]
+ [ run rtree2d_rstar_tt.cpp ]
+
+ [ run rtree3d_linear_i.cpp ]
+ [ run rtree3d_linear_f.cpp ]
+ [ run rtree3d_linear_d.cpp ]
+ [ run rtree3d_linear_tt.cpp ]
+
+ [ run rtree3d_quadratic_i.cpp ]
+ [ run rtree3d_quadratic_f.cpp ]
+ [ run rtree3d_quadratic_d.cpp ]
+ [ run rtree3d_quadratic_tt.cpp ]
+
+ [ run rtree3d_rstar_i.cpp ]
+ [ run rtree3d_rstar_f.cpp ]
+ [ run rtree3d_rstar_d.cpp ]
+ [ run rtree3d_rstar_tt.cpp ]
     ;
     

Deleted: sandbox-branches/geometry/index/test/rtree/rtree2d_linear.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_linear.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
- typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
- typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
-
- test_rtree<P2ic, bgi::linear<4, 2> >();
- test_rtree<P2fc, bgi::linear<4, 2> >();
- test_rtree<P2dc, bgi::linear<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
-
- test_rtree<P2ttmc, bgi::linear<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ test_rtree<P2dc, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+
+ test_rtree<P2fc, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+
+ test_rtree<P2ic, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_linear_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+
+ test_rtree<P2ttmc, bgi::linear<4, 2> >();
+#endif
+
+ return 0;
+}

Deleted: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
- typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
- typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
-
- test_rtree<P2ic, bgi::quadratic<4, 2> >();
- test_rtree<P2fc, bgi::quadratic<4, 2> >();
- test_rtree<P2dc, bgi::quadratic<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
-
- test_rtree<P2ttmc, bgi::quadratic<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ test_rtree<P2dc, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+
+ test_rtree<P2fc, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+
+ test_rtree<P2ic, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_quadratic_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+
+ test_rtree<P2ttmc, bgi::quadratic<4, 2> >();
+#endif
+
+ return 0;
+}

Deleted: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree2d_rstar.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
- typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
- typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
-
- test_rtree<P2ic, bgi::rstar<4, 2> >();
- test_rtree<P2fc, bgi::rstar<4, 2> >();
- test_rtree<P2dc, bgi::rstar<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
-
- test_rtree<P2ttmc, bgi::rstar<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 2, bg::cs::cartesian> P2dc;
+
+ test_rtree<P2dc, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 2, bg::cs::cartesian> P2fc;
+
+ test_rtree<P2fc, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> P2ic;
+
+ test_rtree<P2ic, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree2d_rstar_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 2, bg::cs::cartesian> P2ttmc;
+
+ test_rtree<P2ttmc, bgi::rstar<4, 2> >();
+#endif
+
+ return 0;
+}

Deleted: sandbox-branches/geometry/index/test/rtree/rtree3d_linear.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_linear.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
- typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
- typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
-
- test_rtree<P3ic, bgi::linear<4, 2> >();
- test_rtree<P3fc, bgi::linear<4, 2> >();
- test_rtree<P3dc, bgi::linear<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
-
- test_rtree<P3ttmc, bgi::linear<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_rtree<P3dc, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+
+ test_rtree<P3fc, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+
+ test_rtree<P3ic, bgi::linear<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_linear_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_rtree<P3ttmc, bgi::linear<4, 2> >();
+#endif
+
+ return 0;
+}

Deleted: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
- typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
- typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
-
- test_rtree<P3ic, bgi::quadratic<4, 2> >();
- test_rtree<P3fc, bgi::quadratic<4, 2> >();
- test_rtree<P3dc, bgi::quadratic<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
-
- test_rtree<P3ttmc, bgi::quadratic<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_rtree<P3dc, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+
+ test_rtree<P3fc, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+
+ test_rtree<P3ic, bgi::quadratic<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_quadratic_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_rtree<P3ttmc, bgi::quadratic<4, 2> >();
+#endif
+
+ return 0;
+}

Deleted: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar.cpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/rtree3d_rstar.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
+++ (empty file)
@@ -1,39 +0,0 @@
-// Boost.Geometry (aka GGL, Generic Geometry Library)
-// Unit Test
-
-// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
-// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
-// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
-// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
-
-// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
-// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
-
-// 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)
-
-#include <rtree/test_rtree.hpp>
-
-#include <boost/geometry/geometries/point_xy.hpp>
-#include <boost/geometry/geometries/point.hpp>
-#include <boost/geometry/geometries/box.hpp>
-
-int test_main(int, char* [])
-{
- typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
- typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
- typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
-
- test_rtree<P3ic, bgi::rstar<4, 2> >();
- test_rtree<P3fc, bgi::rstar<4, 2> >();
- test_rtree<P3dc, bgi::rstar<4, 2> >();
-
-#ifdef HAVE_TTMATH
- typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
-
- test_rtree<P3ttmc, bgi::rstar<4, 2> >();
-#endif
-
- return 0;
-}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_d.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<double, 3, bg::cs::cartesian> P3dc;
+
+ test_rtree<P3dc, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_f.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<float, 3, bg::cs::cartesian> P3fc;
+
+ test_rtree<P3fc, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_i.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,29 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+ typedef bg::model::point<int, 3, bg::cs::cartesian> P3ic;
+
+ test_rtree<P3ic, bgi::rstar<4, 2> >();
+
+ return 0;
+}

Added: sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp
==============================================================================
--- (empty file)
+++ sandbox-branches/geometry/index/test/rtree/rtree3d_rstar_tt.cpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -0,0 +1,32 @@
+// Boost.Geometry (aka GGL, Generic Geometry Library)
+// Unit Test
+
+// Copyright (c) 2007-2012 Barend Gehrels, Amsterdam, the Netherlands.
+// Copyright (c) 2008-2012 Bruno Lalande, Paris, France.
+// Copyright (c) 2009-2012 Mateusz Loskot, London, UK.
+// Copyright (c) 2011-2012 Adam Wulkiewicz, Lodz, Poland.
+
+// Parts of Boost.Geometry are redesigned from Geodan's Geographic Library
+// (geolib/GGL), copyright (c) 1995-2010 Geodan, Amsterdam, the Netherlands.
+
+// 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)
+
+#include <rtree/test_rtree.hpp>
+
+#include <boost/geometry/geometries/point_xy.hpp>
+#include <boost/geometry/geometries/point.hpp>
+#include <boost/geometry/geometries/box.hpp>
+
+int test_main(int, char* [])
+{
+
+#ifdef HAVE_TTMATH
+ typedef bg::model::point<ttmath_big, 3, bg::cs::cartesian> P3ttmc;
+
+ test_rtree<P3ttmc, bgi::rstar<4, 2> >();
+#endif
+
+ return 0;
+}

Modified: sandbox-branches/geometry/index/test/rtree/test_rtree.hpp
==============================================================================
--- sandbox-branches/geometry/index/test/rtree/test_rtree.hpp (original)
+++ sandbox-branches/geometry/index/test/rtree/test_rtree.hpp 2012-08-22 18:16:35 EDT (Wed, 22 Aug 2012)
@@ -15,6 +15,7 @@
 
 #include <boost/foreach.hpp>
 #include <vector>
+#include <algorithm>
 
 #include <boost/geometry/extensions/index/rtree/rtree.hpp>
 
@@ -215,19 +216,21 @@
 
     if ( s1 == s2 )
     {
- Range1::const_iterator it1 = output.begin();
- Range2::const_iterator it2 = expected_output.begin();
+ typename Range1::const_iterator it1 = output.begin();
+ typename Range2::const_iterator it2 = expected_output.begin();
         for ( ; it1 != output.end() && it2 != expected_output.end() ; ++it1, ++it2 )
         {
             if ( !rtree.translator().equals(*it1, *it2) )
             {
- BOOST_CHECK(false);
+ BOOST_CHECK(false && "rtree.translator().equals(*it1, *it2)");
                 break;
             }
         }
     }
 }
 
+// spatial query
+
 template <typename Rtree, typename Value, typename Predicates>
 void test_query(Rtree & rtree, Predicates const& pred, std::vector<Value> const& expected_output)
 {
@@ -249,7 +252,7 @@
     test_exactly_the_same_outputs(rtree, output, rtree | bgi::query_filtered(pred));
 }
 
-// rtree queries tests
+// rtree specific queries tests
 
 template <typename Value, typename Algo, typename Box>
 void test_intersects_and_disjoint(bgi::rtree<Value, Algo> const& tree, std::vector<Value> const& input, Box const& qbox)
@@ -362,6 +365,128 @@
     test_query(tree, bgi::within(qbox), expected_output);
 }
 
+// rtree nearest queries
+
+template <typename Rtree, typename Value, typename Point>
+void test_nearest(Rtree const& rtree, std::vector<Value> const& input, Point const& pt)
+{
+ // TODO: Nearest object may not be the same as found by the rtree if distances are equal
+ // Should all objects with the same closest distance be picked?
+
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+ D smallest_d = std::numeric_limits<D>::max();
+ Value expected_output;
+ BOOST_FOREACH(Value const& v, input)
+ {
+ D d = bgi::comparable_distance_near(pt, rtree.translator()(v));
+ if ( d < smallest_d )
+ {
+ smallest_d = d;
+ expected_output = v;
+ }
+ }
+ size_t n = ( std::numeric_limits<D>::max() == smallest_d ) ? 0 : 1;
+
+ Value output;
+ size_t n_res = rtree.nearest(pt, output);
+
+ BOOST_CHECK(n == n_res);
+ if ( n == n_res && 0 < n )
+ {
+ // TODO - perform explicit check here?
+ // should all objects which are closest be checked and should exactly the same be found?
+
+ if ( !rtree.translator().equals(output, expected_output) )
+ {
+ D d1 = bgi::comparable_distance_near(pt, rtree.translator()(output));
+ D d2 = bgi::comparable_distance_near(pt, rtree.translator()(expected_output));
+ BOOST_CHECK(d1 == d2);
+ }
+ }
+}
+
+template <typename Rtree, typename Point>
+struct TestNearestKLess
+{
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ template <typename Value>
+ bool operator()(std::pair<D, Value> const& p1, std::pair<D, Value> const& p2) const
+ {
+ return p1.first < p2.first;
+ }
+};
+
+template <typename Rtree, typename Point>
+struct TestNearestKTransform
+{
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ template <typename Value>
+ Value const& operator()(std::pair<D, Value> const& p) const
+ {
+ return p.second;
+ }
+};
+
+template <typename Rtree, typename Value, typename Point>
+void test_nearest_k(Rtree const& rtree, std::vector<Value> const& input, Point const& pt, size_t k)
+{
+ // TODO: Nearest object may not be the same as found by the rtree if distances are equal
+ // All objects with the same closest distance should be picked
+
+ typedef typename bg::default_distance_result<Point, typename Rtree::indexable_type>::type D;
+
+ std::vector< std::pair<D, Value> > test_output;
+
+ // calculate test output - k closest values pairs
+ BOOST_FOREACH(Value const& v, input)
+ {
+ D d = bgi::comparable_distance_near(pt, rtree.translator()(v));
+
+ if ( test_output.size() < k )
+ test_output.push_back(std::make_pair(d, v));
+ else
+ {
+ std::sort(test_output.begin(), test_output.end(), TestNearestKLess<Rtree, Point>());
+ if ( d < test_output.back().first )
+ test_output.back() = std::make_pair(d, v);
+ }
+ }
+
+ // caluclate biggest distance
+ std::sort(test_output.begin(), test_output.end(), TestNearestKLess<Rtree, Point>());
+ D biggest_d = test_output.back().first;
+
+ // transform test output to vector of values
+ std::vector<Value> expected_output(test_output.size());
+ std::transform(test_output.begin(), test_output.end(), expected_output.begin(), TestNearestKTransform<Rtree, Point>());
+
+ // calculate output using rtree
+ std::vector<Value> output;
+ rtree.nearest(pt, k, std::back_inserter(output));
+
+ // check output
+ bool are_sizes_ok = (expected_output.size() == output.size());
+ BOOST_CHECK( are_sizes_ok );
+ if ( are_sizes_ok )
+ {
+ BOOST_FOREACH(Value const& v, output)
+ {
+ // TODO - perform explicit check here?
+ // should all objects which are closest be checked and should exactly the same be found?
+
+ if ( test_find(rtree, expected_output.begin(), expected_output.end(), v) == expected_output.end() )
+ {
+ D d = bgi::comparable_distance_near(pt, rtree.translator()(v));
+ BOOST_CHECK(d == biggest_d);
+ }
+ }
+ }
+}
+
+// rtree copying and moving
+
 template <typename Value, typename Algo, typename Box>
 void test_copy_assignment_move(bgi::rtree<Value, Algo> & tree, Box const& qbox)
 {
@@ -397,6 +522,9 @@
     test_exactly_the_same_outputs(t2, output, expected_output);
 }
 
+// run all tests for a single Algorithm and single rtree
+// defined by Value
+
 template <typename Value, typename Algo>
 void test_rtree_by_value()
 {
@@ -415,9 +543,19 @@
     //test_touches(tree, input, qbox);
     test_within(tree, input, qbox);
 
+ typedef typename bgi::traits::point_type<B>::type P;
+ P pt;
+ bg::centroid(qbox, pt);
+
+ test_nearest(tree, input, pt);
+ test_nearest_k(tree, input, pt, 10);
+
     test_copy_assignment_move(tree, qbox);
 }
 
+// run all tests for one Algorithm for some number of rtrees
+// defined by some number of Values constructed from given Point
+
 template<typename Point, typename Algo>
 void test_rtree()
 {


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