[SERVER-15201] (2dsphere)Malformed geometry on big polygon Created: 10/Sep/14  Updated: 25/Sep/14  Resolved: 24/Sep/14

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.6.4
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Wiktor Assignee: Ramon Fernandez Marina
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

FreeBSD kadlubek 10.0-RELEASE-p7
FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610
Target: x86_64-unknown-freebsd10.0
Thread model: posix


Attachments: File test.js    
Issue Links:
Related
is related to SERVER-15376 Improve error message for polygons wi... Closed
Operating System: ALL
Steps To Reproduce:

Run attached test.js

Participants:

 Description   

I get an error:
16755 Can't extract geo keys from object, malformed geometry?

When I try to insert document to collection with 2dsphere index.

GeoJSONLint validator doesn't complain about the geometry (and it looks quite valid)



 Comments   
Comment by Wiktor [ 25/Sep/14 ]

Looks great! Thanks.

Comment by Ramon Fernandez Marina [ 25/Sep/14 ]

mongo@vink.pl, MongoDB version 2.7.7, which will be available soon, gives more information on malformed geometries. For the geometry you uploaded in this ticket you'll see the following message:

Edges 268 and 270 cross. Edge locations in degrees: [18.8917568, 50.3957007]-[18.8944286, 50.3971893] and [18.8944579, 50.3971433]-[18.8908588, 50.3995244]"

You can find more details in SERVER-14508.

Regards,
Ramón.

Comment by Ramon Fernandez Marina [ 24/Sep/14 ]

mongo@vink.pl, I've opened SERVER-15376 to see if we can provide an error message with the offending intersection.

Regards,
Ramón.

Comment by Wiktor [ 11/Sep/14 ]

It is relation from:
http://www.openstreetmap.org/relation/2812109

I finally found the intersection in my GeoJSON. So we can close this as a bug. Though it would help a lot, if Mongo would provide the point, where it detected the intersection (feature).

Comment by Ramon Fernandez Marina [ 10/Sep/14 ]

mongo@vink.pl, I'm able to reproduce this behavior. This typically happens when a polygon has intersecting lines, which is not allowed (see SERVER-14348 for example).

Generated at Thu Feb 08 03:37:16 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.