summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo
diff options
context:
space:
mode:
authorRamon Fernandez <ramon@mongodb.com>2017-10-10 12:15:20 -0400
committerRamon Fernandez <ramon@mongodb.com>2017-10-10 12:15:20 -0400
commit27214e46685c094b8a025214b02daf3716514fc7 (patch)
tree564249900fdbad7655619fd124f58f0684933b29 /src/mongo/db/geo
parentf24f7830d01193db30102b8381eeaf4c011d0ea9 (diff)
downloadmongo-27214e46685c094b8a025214b02daf3716514fc7.tar.gz
Revert "SERVER-27968 $geoWithin with $centerSphere should return LineString and Polygon geometries"
This reverts commit f24f7830d01193db30102b8381eeaf4c011d0ea9.
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r--src/mongo/db/geo/geometry_container.cpp23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/mongo/db/geo/geometry_container.cpp b/src/mongo/db/geo/geometry_container.cpp
index c9b4b2f3f48..2b571f1b9f0 100644
--- a/src/mongo/db/geo/geometry_container.cpp
+++ b/src/mongo/db/geo/geometry_container.cpp
@@ -448,17 +448,6 @@ bool GeometryContainer::contains(const S2Polyline& otherLine) const {
return _polygon->bigPolygon->Contains(otherLine);
}
- if (NULL != _cap && (_cap->crs == SPHERE)) {
- // If the radian distance of a line to the centroid of the complement spherical cap is less
- // than the arc radian of the complement cap, then the line is not within the spherical cap.
- S2Cap complementSphere = _cap->cap.Complement();
- if (S2Distance::minDistanceRad(complementSphere.axis(), otherLine) <
- complementSphere.angle().radians()) {
- return false;
- }
- return true;
- }
-
if (NULL != _multiPolygon) {
const vector<S2Polygon*>& polys = _multiPolygon->polygons.vector();
for (size_t i = 0; i < polys.size(); ++i) {
@@ -504,18 +493,6 @@ bool GeometryContainer::contains(const S2Polygon& otherPolygon) const {
return _polygon->bigPolygon->Contains(otherPolygon);
}
- if (NULL != _cap && (_cap->crs == SPHERE)) {
- // If the radian distance of a polygon to the centroid of the complement spherical cap is
- // less than the arc radian of the complement cap, then the polygon is not within the
- // spherical cap.
- S2Cap complementSphere = _cap->cap.Complement();
- if (S2Distance::minDistanceRad(complementSphere.axis(), otherPolygon) <
- complementSphere.angle().radians()) {
- return false;
- }
- return true;
- }
-
if (NULL != _multiPolygon) {
const vector<S2Polygon*>& polys = _multiPolygon->polygons.vector();
for (size_t i = 0; i < polys.size(); ++i) {