[SERVER-1760] Support geo searches across the anti-meridian Created: 08/Sep/10  Updated: 12/Jul/16  Resolved: 15/Nov/12

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 1.7.0
Fix Version/s: 2.3.2

Type: Improvement Priority: Major - P3
Reporter: Alvin Richards (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 3
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-2874 Support for "point in polygon" and "p... Closed
is related to SERVER-4027 Accept geo points equal to 180 (or sp... Closed
Participants:

 Description   

Improvement request:

Customer wants to be able to take the viewport that Google Maps generates and use Mongo to find my points within that viewport. If the viewport spans the anti-meridian, you currently get the error "area must be > 0". For example, lower left corner is [10, 170] and upper right is [20, 30].

Without this, customer will need to split the viewport into two and do two queries, then join the results.

It would be much better if MongoDB handled it directly.

Implementation details:
Would need to support $center and $near, need to determine applicability of $box

Search keywords: geo wrap



 Comments   
Comment by Martin [ 22/Mar/14 ]

Thank you for introducing the new geo indexing. But you should mention not using the $box operator for queries if you have a spherical coordinate system in your documentation more explicitly. The remark "The $box operator returns documents based on grid coordinates and does not query for GeoJSON shapes." is insufficient in my opinion.

Comment by Greg Studer [ 15/Nov/12 ]

See SERVER-2874, new geo indexing will address this problem.

Comment by Greg Studer [ 01/Nov/12 ]

The new indexing changes we're working on, based on the S2 spherical geometry library, should allow this to work. SERVER-2874 has updates.

Comment by Martin [ 31/Oct/12 ]

I would appreciate this issue to be solved soon. It is open for more than two years now.

The workaround to execute a query with two $within terms that are linked with the $or operator isn't working, because the $or operator does not allow 'special' query terms... (see SERVER-3984!!!)
Therefore one can only execute two separate queries and join the results on client site. That's nonsatisfying...

Any other suggestions?

Comment by Eliot Horowitz (Inactive) [ 09/Sep/10 ]

Mathias: how much work do you think that is?

Generated at Thu Feb 08 02:57:57 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.