[SERVER-13721] geoNear calculated distance discrepancy Created: 24/Apr/14  Updated: 06/Dec/22  Resolved: 23/Oct/18

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.6.1-rc0
Fix Version/s: None

Type: Bug Priority: Minor - P4
Reporter: Jonathan Abrahams Assignee: Backlog - Query Team (Inactive)
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by SERVER-13538 Inconsistent geoNear result for Mongo... Closed
Related
Assigned Teams:
Query
Operating System: ALL
Steps To Reproduce:

db.location.drop()
db.location.save({"_id":1, "position" : [-74.044628, 40.689182]})
db.location.save({"_id":2, "position" : [-74.041243, 40.700309]})
db.runCommand( { geoNear : "location" , near : [-74.045255, 40.702554], spherical : true } ).results[0].dis
db.runCommand( { geoNear : "location" , near : { type : "Point" , coordinates: [-74.045255, 40.702554] } , spherical : true } ).results[0].dis

Participants:

 Description   

The geoNear distance results coming back for legacy coordiante pairs (radians) & GeoJSON (meters) for 2.6.1.RC0 differ from 2.4.10.

Step 4 results (radians) 2.4.10 vs 2.6.1:
0.00006597925143247339
0.0000659798416616995

Step 5 results (meters) 2.4.10 vs 2.6.1:
420.82226356145856
420.82602810248557


Generated at Thu Feb 08 03:32:39 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.