[DOCS-1551] Give example of a GeoJSON polygon, specify that they must "connect" Created: 29/May/13  Updated: 30/Oct/23  Resolved: 26/Jun/13

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Improvement Priority: Minor - P4
Reporter: Daniel Pasette (Inactive) Assignee: Allison Reinheimer Moore
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-9764 Save Google Map Polygon cordinates in... Closed
Participants:
Days since reply: 10 years, 34 weeks ago

 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.



 Comments   
Comment by auto [ 26/Jun/13 ]

Author:

{u'username': u'tychoish', u'name': u'Sam Kleinman', u'email': u'samk@10gen.com'}

Message: DOCS-1551 and DOCS-1552: edits
Branch: master
https://github.com/mongodb/docs/commit/9ac7dacf0bd25c8d1393526f7792315f6d06bd4b

Comment by auto [ 26/Jun/13 ]

Author:

{u'username': u'schmalliso', u'name': u'schmalliso', u'email': u'allison.moore@10gen.com'}

Message: DOCS-1551 & 1552 clarifying how GeoJSON polygons work in Mongo & adding example

Signed-off-by: Sam Kleinman <samk@10gen.com>
Branch: master
https://github.com/mongodb/docs/commit/679fa9f2420a56e606b69f6eea77022acfe1f9b8

Generated at Thu Feb 08 07:41:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.