diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2015-06-29 12:22:34 -0400 |
---|---|---|
committer | Kevin Albertson <kevin.albertson@10gen.com> | 2015-07-17 12:07:32 -0400 |
commit | fa5851d3313e74086eb2c1340758e6b535decdf3 (patch) | |
tree | c6c647a2ba44763de79d8f55a8efe49457575570 /src/mongo/db/geo | |
parent | c33f68518b06e6b98596a8133d097e75d8431293 (diff) | |
download | mongo-fa5851d3313e74086eb2c1340758e6b535decdf3.tar.gz |
SERVER-18921 Index points to finest level
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r-- | src/mongo/db/geo/geometry_container.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/geo/geometry_container.h | 5 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/mongo/db/geo/geometry_container.cpp b/src/mongo/db/geo/geometry_container.cpp index c74918e40c2..f3bfca36cfb 100644 --- a/src/mongo/db/geo/geometry_container.cpp +++ b/src/mongo/db/geo/geometry_container.cpp @@ -42,6 +42,10 @@ bool GeometryContainer::isSimpleContainer() const { return NULL != _point || NULL != _line || NULL != _polygon; } +bool GeometryContainer::isPoint() const { + return nullptr != _point; +} + bool GeometryContainer::supportsContains() const { return NULL != _polygon || NULL != _box || NULL != _cap || NULL != _multiPolygon || (NULL != _geometryCollection && (_geometryCollection->polygons.vector().size() > 0 || diff --git a/src/mongo/db/geo/geometry_container.h b/src/mongo/db/geo/geometry_container.h index 95dc8525440..0d7cea0e7c4 100644 --- a/src/mongo/db/geo/geometry_container.h +++ b/src/mongo/db/geo/geometry_container.h @@ -61,6 +61,11 @@ public: bool isSimpleContainer() const; /** + * Whether this geometry is a point + */ + bool isPoint() const; + + /** * Reports the CRS of the contained geometry. * TODO: Rework once we have collections of multiple CRSes */ |