alphagov/imminence — pull request #70 by steventux (2013-11-04 17:19:45+00:00)
Title: Disable spherical coordinates geoNear query option.

https://www.pivotaltracker.com/story/show/60089402
MongoDB 2.0 does not support indexes using a spherical coordinate system.
Until now we have not been using the index because it is not compatible with a spherical query.
This changes the geoNear query to use a cartesian distance calculation which is compatible with the existing index.
We had to change the unit tests to take into account the different distance values calculated using this new coordinate system.

We tested spherical and non-spherical options on geoNear queries:

```
spherical: true time: 954ms
spherical: false time: 349ms
```