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

Cannot index a polygon crossing the 180th meridian

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 2.4.0
    • Fix Version/s: None
    • Component/s: Geo
    • Labels:
      None
    • Environment:
      linux
    • Operating System:
      Linux

      Description

      I could not find a way to index a polygon (rectangle) crossing the 180th meridian.
      Common sense suggest to let some longitudes overflow +- 180 like in this example:

      {"type"=>"Polygon", "coordinates"=>[[[-185.0, 30], [-165.0, 30], [-165.0, 50], [-185.0, 50], [-185.0, 30]]]}

      but it fails with the infamous error "Can't extract geo keys from object, malformed geometry?".

      If I normalize the coordinates to not overflow +-180, then I don't see how mongodb could distinguish that small polygon from a large band going from meridian -165 to meridian +175.

      I could try to split my polygon into two across the 180 meridian but then I fall onto https://jira.mongodb.org/browse/SERVER-8907

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hari.khalsa@10gen.com hari.khalsa@10gen.com
              Reporter:
              thoran Frédéric De Jaeger
              Participants:
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: