-
Type: Task
-
Resolution: Done
-
Priority: Minor - P4
-
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.
- related to
-
SERVER-9764 Save Google Map Polygon cordinates in MongoDB 2dsphere Index
- Closed