[DOCS-13514] Does $near 2d legacy use degrees or radians as distance measure? Created: 15/Mar/20 Updated: 30/Oct/23 Resolved: 03/Feb/23 |
|
| Status: | Closed |
| Project: | Documentation |
| Component/s: | Server |
| Affects Version/s: | 4.2.3 |
| Fix Version/s: | Server_Docs_20231030 |
| Type: | Feedback | Priority: | Trivial - P5 |
| Reporter: | Juhun Kim | Assignee: | Unassigned |
| Resolution: | Gone away | Votes: | 2 |
| Labels: | docs-query | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
windows 10 |
||
| Participants: | |
| Days since reply: | 1 year, 5 days ago |
| Description |
DescriptionIn the below link, I found that $near 2d legacy use radians as distance measure. https://docs.mongodb.com/manual/reference/operator/query/near/ { $near: [ <x>, <y> ], $maxDistance: <distance in radians> }However, when I tested queries in the mongo shell, I got confused because it seems like $near 2d legacy use degrees as distance measure. 1. use degrees db.restaurants.find({ 'address.coord' : { $near : [ -73.9, 40.7 ], $maxDistance : 2/111.1 }} ) #degrees 2. use radians db.restaurants.find({ 'address.coord' : { $near : [ -73.9, 40.7 ], $maxDistance : 2/6378.1 }} ) #radians I checked that the first query with degrees gave correct answer, not the second one with radians. Is there anyone who can solve my problem?
Scope of changesImpact to Other DocsMVP (Work and Date)Resources (Scope or Design Docs, Invision, etc.) |
| Comments |
| Comment by Emet Ozar [ 03/Feb/23 ] |
|
Closing per sarah.olson@mongodb.com comment above. Please feel free to open with a new comment! |
| Comment by Sarah Olson [ 27/Jan/23 ] |
|
Hi johnjhkim@dbs.snu.ac.kr, just following up on this ticket. We'd like to either resolve or close this one. If we don't hear back by February 3, we'll close this out. Thanks for any feedback or updates! |
| Comment by Ashley Brown [ 20/Jan/23 ] |
|
Hi johnjhkim@dbs.snu.ac.kr, did you ever get an answer here? Let me know - otherwise we will close this ticket due to inactivity. Thanks, Ashley |
| Comment by Ravind Kumar (Inactive) [ 16/Mar/20 ] |
|
Thanks for filing a ticket - can you post your question to our Community Support Forum ? We'd love to be able to do more troubleshooting for cases like this, but our bandwidth is limited to working on docs work exclusively. Depending on the outcome of the community work, we might have a more specific fix to apply to the docs. Thanks. |