summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo/shapes.cpp
diff options
context:
space:
mode:
authorHari Khalsa <hkhalsa@10gen.com>2013-10-16 17:29:43 -0400
committerHari Khalsa <hkhalsa@10gen.com>2013-10-24 16:41:06 -0400
commit9d7c6dd9a2a662c741a9f960d9c6b2da1968d532 (patch)
tree5b17f1f92dcfb6f64df1b305087f9dcb533c4db8 /src/mongo/db/geo/shapes.cpp
parent3228ad9c3ca78d55f814689686bf2e619fcde9a9 (diff)
downloadmongo-9d7c6dd9a2a662c741a9f960d9c6b2da1968d532.tar.gz
SERVER-10026 move 2d into stages, remove old query from 2d execution
Diffstat (limited to 'src/mongo/db/geo/shapes.cpp')
-rw-r--r--src/mongo/db/geo/shapes.cpp10
1 files changed, 0 insertions, 10 deletions
diff --git a/src/mongo/db/geo/shapes.cpp b/src/mongo/db/geo/shapes.cpp
index 2eaf7a021a5..2be932344c3 100644
--- a/src/mongo/db/geo/shapes.cpp
+++ b/src/mongo/db/geo/shapes.cpp
@@ -206,9 +206,6 @@ namespace mongo {
// XXX: why is there a mod here?
Point p2 = _points[i % size()];
- GEODEBUG("Doing intersection check of " << fudgeBox.toString()
- << " with seg " << p1.toString() << " to " << p2.toString());
-
// We need to check whether or not this segment intersects our error box
if (fudge > 0 &&
// Points not too far below box
@@ -220,16 +217,13 @@ namespace mongo {
// Points not too far to right of box
fudgeBox._max.x >= std::min(p1.x, p2.x)) {
- GEODEBUG("Doing detailed check");
// If our box contains one or more of these points, we need to do an exact
// check.
if (fudgeBox.inside(p1)) {
- GEODEBUG("Point 1 inside");
return 0;
}
if (fudgeBox.inside(p2)) {
- GEODEBUG("Point 2 inside");
return 0;
}
@@ -239,13 +233,11 @@ namespace mongo {
double xintersT = (fudgeBox._max.y - p1.y) * invSlope + p1.x;
if (fudgeBox._min.x <= xintersT && fudgeBox._max.x >= xintersT) {
- GEODEBUG("Top intersection @ " << xintersT);
return 0;
}
double xintersB = (fudgeBox._min.y - p1.y) * invSlope + p1.x;
if (fudgeBox._min.x <= xintersB && fudgeBox._max.x >= xintersB) {
- GEODEBUG("Bottom intersection @ " << xintersB);
return 0;
}
}
@@ -256,13 +248,11 @@ namespace mongo {
double yintersR = (p1.x - fudgeBox._max.x) * slope + p1.y;
if (fudgeBox._min.y <= yintersR && fudgeBox._max.y >= yintersR) {
- GEODEBUG("Right intersection @ " << yintersR);
return 0;
}
double yintersL = (p1.x - fudgeBox._min.x) * slope + p1.y;
if (fudgeBox._min.y <= yintersL && fudgeBox._max.y >= yintersL) {
- GEODEBUG("Left intersection @ " << yintersL);
return 0;
}
}