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

Geospatial indexing should work with spherical surfaces

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Querying
    • Labels:
      None

      Description

      Geospatial indexing, and querying those data assumes that a surface is Cartesian surface (flat). This is not the case with the Earth. Treating geographical coordinates as Cartesian coordinates, leads to obvious errors.

      I believe $center and $box queries could possibly be "fixed" by most people by upcoming search within polygon SERVER-772, but obviously this won't fix $near results errors.

      It is very desired that there is some kind of specifying that geospatial index should work with sphere, not flat surface.

      Maybe a way to do it from user's point of view would be:

      db.places.create_index(

      {location: ["2d", 6500]}

      )

      Specifying radius of sphere this way would make sense for people who want to use different units than kilometers, or map things on different surfaces (Mars, anyone?).

        Attachments

          Activity

            People

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            hubertlepicki Hubert Lepicki
            Participants:
            Votes:
            13 Vote for this issue
            Watchers:
            9 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: