MongoDB C++ Driver legacy-1.1.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mongo::geo::GeometryCollection< TCoordinates > Class Template Reference
+ Inheritance diagram for mongo::geo::GeometryCollection< TCoordinates >:

Public Member Functions

 GeometryCollection (const BSONObj &bson)
 GeometryCollection constructor.
 
 ~GeometryCollection ()
 Frees the heap memory for each geometry stored in this collection.
 
virtual BSONObj toBSON () const
 Obtain a BSON representation of this geometry collection.
 
virtual BoundingBox< TCoordinates > getBoundingBox () const
 Obtain the bounding box surrounding the set of geometries in this geometry collection.
 
virtual GeoObjType getType () const
 Get the geometry type of this object.
 
const std::vector< const GeoObj< TCoordinates > * > & getGeometries () const
 Get a vector of pointers to the geometries contained in this geometry collection.
 
virtual BSONObj toBSON () const =0
 Obtain a BSON representation of this GeoObj.
 
virtual BoundingBox< TCoordinates > getBoundingBox () const =0
 Obtain the bounding box of this GeoObj.
 
virtual GeoObjType getType () const =0
 Get the geometry type of this object.
 

Additional Inherited Members

- Static Protected Member Functions inherited from mongo::geo::Geometry< TCoordinates >
static BoundingBox< TCoordinates > * computeBoundingBox (const std::vector< Point< TCoordinates > > &points)
 Compute the bounding box around the given points.
 
static BoundingBox< TCoordinates > * computeBoundingBox (const std::vector< BoundingBox< TCoordinates > > &bboxes)
 Compute the smallest bounding box that contains the given bounding boxes.
 
static BoundingBox< TCoordinates > * parseBoundingBox (const BSONObj &bson)
 Parses the bounding box defined by the given geometry shape, represented in BSON.
 

Constructor & Destructor Documentation

◆ GeometryCollection()

template<typename TCoordinates >
mongo::geo::GeometryCollection< TCoordinates >::GeometryCollection ( const BSONObj bson)
explicit

GeometryCollection constructor.

Parameters
bsonA BSON representation of the geometry collection.

Member Function Documentation

◆ getBoundingBox()

template<typename TCoordinates >
BoundingBox< TCoordinates > mongo::geo::GeometryCollection< TCoordinates >::getBoundingBox
virtual

Obtain the bounding box surrounding the set of geometries in this geometry collection.

Returns
A bounding box containing every geometry in this collection.

Implements mongo::geo::GeoObj< TCoordinates >.

◆ getGeometries()

template<typename TCoordinates >
const std::vector< const GeoObj< TCoordinates > * > & mongo::geo::GeometryCollection< TCoordinates >::getGeometries

Get a vector of pointers to the geometries contained in this geometry collection.

Each GeoObj has been instantiated as the appropriate subclass of GeoObj. To determine the specific type of each pointed-to object, call ->getType() on the pointer.

This GeometryCollection object has ownership of the const GeoObj*'s returned.

Returns
a vector of const pointers to the geometries in this collection.

◆ getType()

template<typename TCoordinates >
virtual GeoObjType mongo::geo::GeometryCollection< TCoordinates >::getType ( ) const
inlinevirtual

Get the geometry type of this object.

Returns
GeoObjType_GeometryCollection

Implements mongo::geo::GeoObj< TCoordinates >.

◆ toBSON()

template<typename TCoordinates >
virtual BSONObj mongo::geo::GeometryCollection< TCoordinates >::toBSON ( ) const
inlinevirtual

Obtain a BSON representation of this geometry collection.

Example structure:

{ "type" : "GeometryCollection", "geometries" : [ { "type": "Point", "coordinates": [ 100.0, 0.0 ] }, { "type": "LineString", "coordinates": [ [ 101.0, 0.0 ], [ 102.0, 1.0 ] ] } ] }

Returns
a BSON representation of this geometry collection.

Implements mongo::geo::GeoObj< TCoordinates >.


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