Skip to content

Commit 82861e1

Browse files
author
Bob Grabar
committed
DOCS-934 review edits
1 parent cff05b3 commit 82861e1

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

source/reference/operator/centerSphere.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@ $centerSphere
1818

1919
- The center point
2020

21-
- The radian. To calculate the radian, divide the radius of
22-
the circle by the radius of the sphere.
23-
24-
db.collection.find( { loc: { $within: { $centerSphere: [ [0,0], 10 / 3959 ] } } } )
21+
- The angular distance in radians (distance along the surface of the
22+
earth).
2523

2624
The following example returns all documents within a 10 mile radius
27-
of longitude ``88 W`` and latitude ``30 N``. The document determines
28-
the radian by dividing 10 miles by the approximate radius of the earth:
29-
3960 miles.
25+
of longitude ``88 W`` and latitude ``30 N``. The distance (10 miles)
26+
is converted to radians by dividing by the approximate radius of the
27+
earth (3959 miles).
3028

3129
.. code-block:: javascript
3230

33-
db.collection.find( { loc: { $within: { $centerSphere: [ [ 88 , 30 ], 10 / 3960 ] } } } )
31+
db.collection.find( { loc: { $within: { $centerSphere: { [88,30], 10 /* miles */ / 3959 /* miles */ } } } } )
3432

3533
.. include:: /includes/note-geospatial-index-must-exist.rst

source/reference/operator/within.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ $within
3535

3636
db.collection.find( { location: { $within: { $center: [ center, radius } } } );
3737

38-
- Circles measured by spherical geometry. Use the
38+
- Circular distance on a sphere. Use the
3939
:operator:`$centerSphere` operator. For the syntax, see :operator:`$centerSphere`.
4040

4141
- Polygons. Use the :operator:`$polygon` operator. Specify polygons with an array of points. See the

0 commit comments

Comments
 (0)