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

Give example of a GeoJSON polygon, specify that they must "connect"

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • Server
    • None

    Description

      Our documentation does not clearly describe that a polygon in GeoJSON is composed of one or more "LinearRing." There is an example here: http://docs.mongodb.org/manual/core/2dsphere/#store-geojson-objects
      and here:
      http://docs.mongodb.org/manual/reference/operator/geoWithin/

      See: http://geojson.org/geojson-spec.html#polygon

      For type "Polygon", the "coordinates" member must be an array of LinearRing coordinate arrays. For Polygons with multiple rings, the first must be the exterior ring and any others must be interior rings or holes.

      In addition, MongoDB requires that the outer loop not self-intersect. Inner loops have to be fully within the outer loop and not intersect one another.

      Attachments

        Activity

          People

            allison.moore@mongodb.com Allison Reinheimer Moore
            dan@mongodb.com Daniel Pasette (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              10 years, 34 weeks ago