Skip to Main Content

MongoByte MongoDB Logo

Welcome to the new MongoDB Feedback Portal!

{Improvement: "Your idea"}
We’ve upgraded our system to better capture and act on your feedback.
Your feedback is meaningful and helps us build better products.

Status Submitted
Categories Database
Created by Guest
Created on Jul 6, 2022

Add operator that would calculate distance between 2 geolocation points

It would be great to have operator that would calculate distance between 2 geolocation points, and not to do it manually with big aggregate queries. I suggest to add 2 new operators that would calculate distance in two different ways, as discussed in this Community Post: https://www.mongodb.com/community/forums/t/how-to-calculate-distance-between-two-geolocation-points/173045
  • Attach files
  • Guest
    Oct 24, 2023
    having same use case as mentioned , it would be great addition .
  • Guest
    Aug 9, 2023
    Having the same use case as @adam, so yes; please add it
  • Guest
    Nov 6, 2022
    I could really use this operator right now! Definitely got my vote. Although in addition to the implementation discussed in the linked post above (calculating distance between two points both within the documents), I would also like to be able to calculate distance between one Point within my documents and a static point provided within the query. For example, if I wanted to calculate distance between a central location and a bunch of Points within my documents.