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

Geospatial indexing should work with spherical surfaces

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

      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?).

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

              Created:
              Updated:
              Resolved: