Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-1677

$geoNear queries and legacy points

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • None
    • None
    • None
    • None

    Description

      http://docs.mongodb.org/manual/reference/operator/nearSphere/ :

      "In a 2dsphere index, a grid coordinate is interpreted as a GeoJSON point."

      This is unclear. It seems to imply that a $geoNear query with a grid coordinate like [1, 2] will act the same as a $geoNear query with a GeoJSON point--that is, it will calculate $maxDistance in *meters*. This is false: $geoNear acts like other geospatial operators, interpreting $maxDistance in radians for grid coordinates and in meters for GeoJSON coordinates.

      While we're here, can we standardize on either "grid coordinates" or "legacy coordinate pairs" as the term for non-GeoJSON points?

      Attachments

        Activity

          People

            sam.kleinman Sam Kleinman (Inactive)
            jesse@mongodb.com A. Jesse Jiryu Davis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 32 weeks, 2 days ago