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

$geoWithin doesn't return correct geo-points when using $box query

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.6.4
    • Component/s: Geo
    • None
    • ALL

      I'm trying to find geolocations inside a geographical area using a bounding box but it seems that $geoWithin query doesn't return correct points at certain range of the bounding box. Adding an example query below.

      db.wisp.find({"features.geometry":{ $geoWithin: {$box: [[156.82969752500003, -8.287855253974222],[-10.05235377500002, 61.99562499932121]]}}});

      An observation - If I make the south-west longitude value to -156, then correct values are returned.

        1. Screen Shot 2018-04-27 at 4.32.44 PM.png
          393 kB
          Rachita Bansal
        2. Screen Shot 2018-05-02 at 1.03.04 PM.png
          457 kB
          Rachita Bansal
        3. Screen Shot 2018-05-02 at 1.03.26 PM.png
          469 kB
          Rachita Bansal

            Assignee:
            asya.kamsky@mongodb.com Asya Kamsky
            Reporter:
            rachita.bansal Rachita Bansal
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: