[SERVER-23197] Distance calculation for multiple lat and long error Created: 17/Mar/16 Updated: 29/Mar/16 Resolved: 28/Mar/16 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | shibimukesh | Assignee: | Kelsey Schubert |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Operating System: | ALL | ||||||||
| Participants: | |||||||||
| Description |
|
how to calculate distance for multiple points its error in mongodb |
| Comments |
| Comment by shibimukesh [ 29/Mar/16 ] |
|
thank you, Best Regards, *Shibi.M*Hadoop Developer NDOT Technologies Pvt Ltd, shibi.m@ndot.in US : +1 (323) 982-8943 <http://www.ndot.in/>Enterprise Mobility – CRM – ERP – Mobile – Web – INDIA (HQ) - Singapore - United States - Dubai - Morocco – Spain - DISCLAIMER: The information contained in this message (including any attachments) is On Tue, Mar 29, 2016 at 3:29 AM, Thomas Schubert (JIRA) <jira@mongodb.org> |
| Comment by Kelsey Schubert [ 28/Mar/16 ] |
|
Hi shibish, This operation to find the length of a lineString would be best handled by your application. As I mentioned in my previous comment, an implementation of the haversine formula for MongoDB is presented here. Determining the best solution for your particular use case would involve more discussion, and I would recommend that you consider posting your question on the mongodb-users group for MongoDB-related support. Kind regards, |
| Comment by shibimukesh [ 24/Mar/16 ] |
|
Hi Thomas, Thankyou for your response exactly thats the result am expecting.. With regards, Best Regards, *Shibi.M*Hadoop Developer NDOT Technologies Pvt Ltd, shibi.m@ndot.in US : +1 (323) 982-8943 <http://www.ndot.in/>Enterprise Mobility – CRM – ERP – Mobile – Web – INDIA (HQ) - Singapore - United States - Dubai - Morocco – Spain - DISCLAIMER: The information contained in this message (including any attachments) is On Thu, Mar 24, 2016 at 5:25 AM, Thomas Schubert (JIRA) <jira@mongodb.org> |
| Comment by Kelsey Schubert [ 23/Mar/16 ] |
|
Hi shibish, Thank you for the additional details. My understanding is that you are looking for an operation in MongoDB to provide a sum of the distance between each adjacent position in the lineString. As an example, using the coordinates that you have provided, the distance would be 0.7924 km + 4.088 km + 0.7451 km = 5.6255 kilometers. Is this the output that you would expect? If not can you please explain how you would like the distance to be calculated? You may benefit from reviewing this blog post which includes a function, haversine, to compute the distance between two positions. The complete code solution to the problem described in the blog post can be found here. For MongoDB-related support discussion please post on the mongodb-users group or Stack Overflow with the mongodb tag. Kind regards, |
| Comment by shibimukesh [ 19/Mar/16 ] |
|
how to calculate the distance for this multipoint of lat and long Best Regards, *Shibi.M*Hadoop Developer NDOT Technologies Pvt Ltd, shibi.m@ndot.in US : +1 (323) 982-8943 <http://www.ndot.in/>Enterprise Mobility – CRM – ERP – Mobile – Web – INDIA (HQ) - Singapore - United States - Dubai - Morocco – Spain - DISCLAIMER: The information contained in this message (including any attachments) is |
| Comment by shibimukesh [ 19/Mar/16 ] |
|
collection name: driver location history } and my query is db.d.find({ } and my output is its simply returns the document i need the output of total Best Regards, *Shibi.M*Hadoop Developer NDOT Technologies Pvt Ltd, shibi.m@ndot.in US : +1 (323) 982-8943 <http://www.ndot.in/>Enterprise Mobility – CRM – ERP – Mobile – Web – INDIA (HQ) - Singapore - United States - Dubai - Morocco – Spain - DISCLAIMER: The information contained in this message (including any attachments) is On Fri, Mar 18, 2016 at 8:06 PM, Thomas Schubert (JIRA) <jira@mongodb.org> |
| Comment by Kelsey Schubert [ 18/Mar/16 ] |
|
Hi shibish, Sorry for the confusion, please help by answering the following questions:
Thank you, |
| Comment by shibimukesh [ 18/Mar/16 ] |
|
Hi Best Regards, *Shibi.M*Hadoop Developer NDOT Technologies Pvt Ltd, shibi.m@ndot.in US : +1 (323) 982-8943 <http://www.ndot.in/>Enterprise Mobility – CRM – ERP – Mobile – Web – INDIA (HQ) - Singapore - United States - Dubai - Morocco – Spain - DISCLAIMER: The information contained in this message (including any attachments) is On Fri, Mar 18, 2016 at 12:22 AM, Thomas Schubert (JIRA) <jira@mongodb.org> |
| Comment by Kelsey Schubert [ 17/Mar/16 ] |
|
Hi shibish, If I am understanding correctly, I believe this is a duplicate of the feature request described in SERVER-14948. Please feel free to vote for it and watch it for updates. Thank you, |