[SERVER-9240] Exterior shell of polygon is invalid: duplicate points not ignored in Polygon/MultiPolygon Created: 04/Apr/13 Updated: 11/Jul/16 Resolved: 11/Oct/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Geo |
| Affects Version/s: | 2.4.1 |
| Fix Version/s: | 2.5.3 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Brian Britten | Assignee: | Daniel Pasette (Inactive) |
| Resolution: | Done | Votes: | 2 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Single MongoDB instance running on Window laptop. |
||
| Attachments: |
|
||||||||||||
| Issue Links: |
|
||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||
| Participants: | |||||||||||||
| Description |
|
When trying to add a GeoJSON polygon to a field with a 2dsphere index I get the error: "Exterior shell of polygon is invalid". That same GeoJSON polygon appears to be vaild when tested at http://geojsonlint.com/. How can I identify why the shell is invalid? |
| Comments |
| Comment by auto [ 10/Oct/13 ] |
|
Author: {u'username': u'monkey101', u'name': u'Dan Pasette', u'email': u'dan@10gen.com'}Message: |
| Comment by Daniel Pasette (Inactive) [ 02/Sep/13 ] |
|
Thanks for the report. |
| Comment by Olaf Krische [ 02/Sep/13 ] |
|
Not working MultiPolygon |
| Comment by Olaf Krische [ 02/Sep/13 ] |
|
I can verify that error with Mongo 2.5.1 and 2.5.2, though using a MultiPolygon (MultiPolygonSample.json) The MultiPolygon only consists of one Polygon. And the polygon only has one linear ring with 75 points. First and last point are the same. Then i continously removed points from the end (except for the last). When there are only points 49 left ( i removed [13.6939, 51.0979] ), then i was finally able to save the sample. |
| Comment by Brian Britten [ 05/Apr/13 ] |
|
In reviewing the points further, the last point and the second to last point in the polygon are the same. After removing the duplicate point the GeoJSON saved correctly. Should the GeoJSON be invalid if it contains a duplicate point? |