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

Cannot index a polygon crossing the 180th meridian

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major - P3
    • Resolution: Works as Designed
    • 2.4.0
    • None
    • Geo
    • None
    • linux
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: