[SERVER-3725] Geo polygon searches with a line leaves off the greatest point Created: 30/Aug/11  Updated: 11/Jul/16  Resolved: 06/Sep/11

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.0.0-rc0
Fix Version/s: 2.0.0-rc2

Type: Bug Priority: Minor - P4
Reporter: Spencer Brody (Inactive) Assignee: Greg Studer
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-3726 Geo polygon search bugs Closed
Related
is related to SERVER-772 geo polygon searches Closed
Operating System: ALL
Participants:

 Description   

> t = db.geo_polygon5;
test.geo_polygon5
> t.drop();
true
>
> t.insert(

{loc:[0,0]}

)
> t.insert(

{loc:[1,0]}

)
> t.insert(

{loc:[2,0]}

)
> t.insert(

{loc:[3,0]}

)
> t.insert(

{loc:[4,0]}

)
>
> t.ensureIndex(

{ loc : "2d" }

);
>
> t.find( { loc: { "$within":

{ "$polygon" : [[0,0], [2,0], [4,0]] }

}} )

{ "_id" : ObjectId("4e5d35916c2fa14a9f1ae299"), "loc" : [ 1, 0 ] } { "_id" : ObjectId("4e5d35916c2fa14a9f1ae298"), "loc" : [ 0, 0 ] } { "_id" : ObjectId("4e5d35916c2fa14a9f1ae29b"), "loc" : [ 3, 0 ] } { "_id" : ObjectId("4e5d35916c2fa14a9f1ae29a"), "loc" : [ 2, 0 ] }

The point [4,0] is left out of the results.



 Comments   
Comment by auto [ 06/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: triangle test can't assume diagonal points SERVER-3725
Branch: master
https://github.com/mongodb/mongo/commit/41f0781429225f979cdd2b19e09ca696729860f5

Comment by auto [ 06/Sep/11 ]

Author:

{u'login': u'gregstuder', u'name': u'gregs', u'email': u'greg@10gen.com'}

Message: need to add error value to bounding boxes on polygons + boxes SERVER-3725
Branch: master
https://github.com/mongodb/mongo/commit/333e0276374e229764277053ea4be6b92c6fe3ed

Comment by Greg Studer [ 06/Sep/11 ]

Issue with error and boundaries, fix should be in 2.0 if approved.

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