MongoDB C++ Driver  legacy-1.1.2
Static Protected Member Functions | List of all members
mongo::geo::Geometry< TCoordinates > Class Template Reference
+ Inheritance diagram for mongo::geo::Geometry< TCoordinates >:

Static Protected Member Functions

static BoundingBox< TCoordinates > * computeBoundingBox (const std::vector< Point< TCoordinates > > &points)
 Compute the bounding box around the given points. More...
 
static BoundingBox< TCoordinates > * computeBoundingBox (const std::vector< BoundingBox< TCoordinates > > &bboxes)
 Compute the smallest bounding box that contains the given bounding boxes. More...
 
static BoundingBox< TCoordinates > * parseBoundingBox (const BSONObj &bson)
 Parses the bounding box defined by the given geometry shape, represented in BSON. More...
 

Additional Inherited Members

- Public Member Functions inherited from mongo::geo::GeoObj< TCoordinates >
virtual BSONObj toBSON () const =0
 Obtain a BSON representation of this GeoObj. More...
 
virtual BoundingBox< TCoordinates > getBoundingBox () const =0
 Obtain the bounding box of this GeoObj. More...
 
virtual GeoObjType getType () const =0
 Get the geometry type of this object. More...
 

Member Function Documentation

template<typename TCoordinates >
BoundingBox< TCoordinates > * mongo::geo::Geometry< TCoordinates >::computeBoundingBox ( const std::vector< Point< TCoordinates > > &  points)
staticprotected

Compute the bounding box around the given points.

Caller has ownership of the returned pointer.

Parameters
pointsThe points that the computed bounding box will surround.
Returns
A pointer to a bounding box around the given points.
template<typename TCoordinates >
BoundingBox< TCoordinates > * mongo::geo::Geometry< TCoordinates >::computeBoundingBox ( const std::vector< BoundingBox< TCoordinates > > &  bboxes)
staticprotected

Compute the smallest bounding box that contains the given bounding boxes.

This can also be thought of as the one large bounding box around the union of points contained in the several smaller bounding boxes passed to this function. Caller had ownership of the returned pointer.

Parameters
bboxesthe bounding boxes that the computed bounding box will surround.
Returns
A pointer to a bounding box around the given bounding boxes.
template<typename TCoordinates >
BoundingBox< TCoordinates > * mongo::geo::Geometry< TCoordinates >::parseBoundingBox ( const BSONObj bson)
staticprotected

Parses the bounding box defined by the given geometry shape, represented in BSON.

Caller had ownership of the returned pointer.

Parameters
bsonThe BSON for the geometry shape.
Returns
If the shape defines its own bounding box with the "bbox" field, returns a pointer to an instantiated bounding box around the shape. Otherwise returns NULL.

The documentation for this class was generated from the following file: