Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-8038

$nearSphere on boundaries does not work

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.2.2
    • Component/s: Geo
    • Environment:
      Ubuntu 64 bits 12.04
    • ALL

      I have a 2d index on "place.location" on my collection.
      I would like to know what is my northest object.
      To do so I first write this command
      nws_rs_1:SECONDARY> db.device.find({"place.location" : {$near : [0,90]})
      But since it considers earth as 2 dimentionnal I got wrong results. (only those where longitude is near 0)

      Then when I used $nearSphere I always got the result below:
      nws_rs_1:SECONDARY> db.device.find({"place.location" : {$nearSphere : [0,90]})
      error: {
      "$err" : "point (0,-90.6664) must be in earth-like bounds of long : [-180, 180], lat : [-90, 90] ",
      "code" : 14808
      }

      Any idea why this happend ? Otherwise how could I get the northest point in my collection ?

      BR,

      Thomas.

            Assignee:
            hari.khalsa@10gen.com hari.khalsa@10gen.com
            Reporter:
            thomas.rosenblatt@gmail.com Thomas Rosenblatt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: