MongoDB C++ Driver
legacy-1.1.2
|
Public Member Functions | |
GeometryCollection (const BSONObj &bson) | |
GeometryCollection constructor. More... | |
~GeometryCollection () | |
Frees the heap memory for each geometry stored in this collection. | |
virtual BSONObj | toBSON () const |
Obtain a BSON representation of this geometry collection. More... | |
virtual BoundingBox< TCoordinates > | getBoundingBox () const |
Obtain the bounding box surrounding the set of geometries in this geometry collection. More... | |
virtual GeoObjType | getType () const |
Get the geometry type of this object. More... | |
const std::vector< const GeoObj< TCoordinates > * > & | getGeometries () const |
Get a vector of pointers to the geometries contained in this geometry collection. More... | |
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. 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... | |
|
explicit |
GeometryCollection constructor.
bson | A BSON representation of the geometry collection. |
|
virtual |
Obtain the bounding box surrounding the set of geometries in this geometry collection.
Implements mongo::geo::GeoObj< TCoordinates >.
const std::vector< const GeoObj< TCoordinates > * > & mongo::geo::GeometryCollection< TCoordinates >::getGeometries | ( | ) | const |
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.
|
inlinevirtual |
Get the geometry type of this object.
Implements mongo::geo::GeoObj< TCoordinates >.
|
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 ] ] } ] }
Implements mongo::geo::GeoObj< TCoordinates >.