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

$box that spans the Antemeridian doesn't work as expected

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Works as Designed
    • Icon: Major - P3 Major - P3
    • None
    • 6.0.5
    • None
    • Server Triage
    • ALL

    Description

      I have a query that uses $box in a $geoWithin. 

      I use Google Maps in my app, and whenever a user views a part of the map that spans across the Antemeridian (where part of the viewport is on one side of it and part of it on the other), we get incorrect results. 
      I found this SO issue that basically describes the same problem, but with no relevant answers: https://stackoverflow.com/questions/71799194/bug-of-geowithin-box-mongodb

      P.S. - Switching to a Polygon solves this, but it really makes sense for my app to use 2d rather than 2dsphere, and switching would also mean handling projection issues, and I couldn't find a Mongo recommended way of doing this. 

      Attachments

        Activity

          People

            yuan.fang@mongodb.com Yuan Fang
            omer@gable.to Omer Mizrahi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: