xmsgrid  1.0
GmPtSearch.cpp File Reference
#include <xmsgrid/geometry/GmPtSearch.h>
#include <boost/geometry.hpp>
#include <boost/geometry/geometries/register/point.hpp>
#include <boost/geometry/index/rtree.hpp>
#include <boost/iterator/counting_iterator.hpp>
#include <xmscore/points/pt.h>
#include <xmscore/stl/utility.h>
#include <xmscore/misc/XmError.h>
#include <xmscore/misc/DynBitset.h>
#include <xmscore/misc/XmConst.h>
#include <xmsgrid/geometry/GmPtSearch.t.h>
#include <boost/assign.hpp>
#include <xmscore/testing/TestTools.h>

Go to the source code of this file.

Classes

class  xms::fSatisfies
 a class used with the boost::geometry::index::satisfies function More...
 
class  xms::idx_pt
 class for indexing the points More...
 
class  xms::GmPtSearchImpl
 Implementation of GmPtSearch. Generic class for searching location data. Uses a boost R-tree to query a set of locations. Works for 2D and 3D. More...
 

Namespaces

 xms
 XMS Namespace.
 

Macros

#define _TS_ASSERT_POINTS_FOUND(a_file, a_line, a_required, a_optional, a_found)   iAssertPointsFound(a_file, a_line, a_required, a_optional, a_found)
 macro for testing
 
#define TS_ASSERT_POINTS_FOUND(a_required, a_optional, a_found)   _TS_ASSERT_POINTS_FOUND(__FILE__, __LINE__, a_required, a_optional, a_found)
 macro for testing
 

Typedefs

typedef bg::model::box< bPt > xms::box
 box
 
typedef size_t xms::value
 value
 
typedef bgi::quadratic< 8 > xms::qRtree
 qRtree
 

Functions

 BOOST_GEOMETRY_REGISTER_POINT_3D (bPt, double, cs::cartesian, x, y, z)
 
void iGetPoints2 (std::vector< Pt3d > &a_pts, std::vector< float > &a_scalar, std::vector< Pt3d > &a_iPts)
 Get GMS tutorial data. More...
 
void iAssertPointsFound (const char *a_file, int a_line, const std::vector< int > &a_required, const std::vector< int > &a_optional, const std::vector< int > &a_found)
 helper function for testing More...
 
static void iSetupPts (std::vector< Pt3d > &pts, bool a_2d)
 helper function for testing More...
 
static void iSetupPtsOctant (std::vector< Pt3d > &pts)
 helper function for testing More...
 

Detailed Description

Definition in file GmPtSearch.cpp.

Function Documentation

◆ BOOST_GEOMETRY_REGISTER_POINT_3D()

BOOST_GEOMETRY_REGISTER_POINT_3D ( bPt  ,
double  ,
cs::cartesian  ,
,
,
 
)

boost macro for registering bPt as a 3D point. Most of our use of the spatial indexes is in 2D. However, we do use the point searching in 3D if the user constructs the object with 2d specified as false.

◆ iAssertPointsFound()

void iAssertPointsFound ( const char *  a_file,
int  a_line,
const std::vector< int > &  a_required,
const std::vector< int > &  a_optional,
const std::vector< int > &  a_found 
)

helper function for testing

Parameters
a_filefile.
a_lineline.
a_required???
a_optional???
a_found???

Definition at line 686 of file GmPtSearch.cpp.

◆ iGetPoints2()

void iGetPoints2 ( std::vector< Pt3d > &  a_pts,
std::vector< float > &  a_scalar,
std::vector< Pt3d > &  a_iPts 
)

Get GMS tutorial data.

Parameters
[out]a_ptsThe points.
[out]a_scalarThe scalar values.
[out]a_iPts???

Definition at line 656 of file GmPtSearch.cpp.

Referenced by PtSearchUnitTests::testTest2dTutData().

◆ iSetupPts()

static void iSetupPts ( std::vector< Pt3d > &  pts,
bool  a_2d 
)
static

helper function for testing

Parameters
ptsPoints.
a_2dtrue if 2D.

Definition at line 744 of file GmPtSearch.cpp.

Referenced by PtSearchUnitTests::testActivity2d(), PtSearchUnitTests::testTest2d(), and PtSearchUnitTests::testTest3d().

◆ iSetupPtsOctant()

static void iSetupPtsOctant ( std::vector< Pt3d > &  pts)
static

helper function for testing

Parameters
ptsPoints.

Definition at line 867 of file GmPtSearch.cpp.

Referenced by PtSearchUnitTests::testActivity3d(), and PtSearchUnitTests::testTest3dOct().