Geo polygon searches with a line leaves off the greatest point

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.0.0-rc2
    • Affects Version/s: 2.0.0-rc0
    • Component/s: Geo
    • None
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      > 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.

            Assignee:
            Greg Studer (Inactive)
            Reporter:
            Spencer Brody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: