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

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

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • Affects Version/s: None
    • Component/s: Server
    • Labels:
      None

      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.

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

              Created:
              Updated:
              Resolved:
              10 years, 46 weeks, 4 days ago