-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Curious Warning : Ring Self-intersection at or near point 0 1 #63
Comments
I think this might be down to the OGC "standard" definition of polygon validity. If I'm remembering correctly, it's allowed for an interior ring to touch, but not cross, an exterior ring once. But it's not okay for a ring (exterior or interior) to touch or cross itself. However, the latest version of the Mapbox vector tile specification says:
The first sentence would (like the OGC standard), appear to exclude the first polygon with the self-tangential exterior ring. It's not clear to me whether the second sentence would also exclude the second polygon with the tangential interior ring. The documentation does show an example with clearly overlapping exterior and interior, though! Do both, or just the second, examples crash the SDK? I should think that's a bug in the SDK as, even with invalid input, crashing is probably undesired behaviour. |
Hello, you're right the first version of the polygon is not OGC valid, and if you query Postgis with
You get
Sorry for fake bug... I'm closing. |
@lexman @zerebubuth the OGC invalid winding order example on the specification page was pointed out by @nvkelso a couple weeks back - it's on my list to fix! Apologies for the potential confusion. https://github.com/mapbox/vector-tiles/issues/19 |
@lexman we're doing a similar thing to Just to make absolutely sure; the output tile of the first example (self-touching exterior ring - OGC invalid) crashes the SDK, but the output tile for the second one (interior ring touching outer - OGC valid) is okay? Or do they both have problems? |
Sorry for answering so late... We've fixed a few issues, we've upgraded to version 4 and we've made use of on-_invalid_geometry_make_valid. But in the rush we didn't test every step to see what really fixed the issue because our mobile developper is on hollydays. Actually, the application crashes could have been caused by a layer not simplified enought. It would produce some 1MB tiles and we suspect it caused memory issues on the iphone. If we run again in a similare case :(, we'll re-open this issue. |
Hello,
when using mapbox-vector-tile with some shape from Postgis this message appears in the log :
I've been able to isolate a test case :
The shape looks like :
The funny thing is, if you describe the exact same shape another way (with an inner ring), the message does not appear any more :
This looks like it's a case of invalid geometry. Also, if I send the tile produced to a mobile working with mapbox iOS SDK, it craches.
The text was updated successfully, but these errors were encountered: