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

Geospatial indexing should work with spherical surfaces

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Querying
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: