[SERVER-11004] Implement $geoNear for MultiPoints and GeometryCollections containing a single point Created: 02/Oct/13  Updated: 22/Mar/23

Status: Open
Project: Core Server
Component/s: Geo
Affects Version/s: None
Fix Version/s: features we're not sure of

Type: Improvement Priority: Minor - P4
Reporter: Samantha Ritter (Inactive) Assignee: Backlog - Query Integration
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
Assigned Teams:
Query Integration
Participants:

 Description   

Can't run $geoNear queries for a MultiPoint like this:

{ 'type' : 'MultiPoint', 'coordinates' : [ [1, 1] ] }

or a GeometryCollection like this:

{ 'type' : 'GeometryCollection',
'geometries' : [

{ 'type' : 'Point', 'coordinates' : [1, 1] }

]
}



 Comments   
Comment by Siyuan Zhou [ 11/Jun/15 ]

Hi nevi_me, I think it seems to be encouraging users to use $geoNear query with MultiPoints and GeometryCollections, which is misleading, so I'll leave this ticket to "Features we're not sure of".

Comment by Neville Dipale [ 11/Jun/15 ]

Hi siyuan.zhou@10gen.com, thanks, that makes sense. What I'm wondering is if this ticket will add MultiPoints and GeometryCollections containing a single point to extend the current capabilities?

Comment by Siyuan Zhou [ 10/Jun/15 ]

Hi nevi_me, only geo near around one center is supported, as mentioned in the documentation.

Comment by Neville Dipale [ 06/Jun/15 ]

Is the requirement for Mongo to cast the MultiPoint or GeometryCollection to a Point?

I tried running $geoNear on a MultiPoint with two points, and got an error.

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