-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Incorrect inner ring added to diff result. #69
Comments
Another case that produces a similar result--this one has no intersection between the two shapes. Green shape is first argument, blue is second. It's necessary to call
|
This is possibly related to my pull request around multipolys and comparing contour ids. Does it resolve itself if you undo my changes by any chance? |
@rowanwins I'm happy to try it. Do you have PR# so I can see which changes to undo? I looked through the PRs a bit, and it wasn't obvious to me which one you meant. |
Ah, I already didn't have #56 merged in. I was going to take a crack at making a fix, but it feels like the PRs are piling up a bit, so it's unclear what baseline to begin from. My PRs aren't that important, but whether to begin from #56+#57+#58+#64 or something else--that's a little tough. Trying not to have my local fork diverge so much that it's hard to contribute back or communicate bugs. And I know that people just get busy, and that's the default reason why things don't happen. No worries. |
Update: I don't think the current implementation is coded to handle the case of holes created by exterior ring edges. Inside of
The trouble is that The I had previously said in this comment that "Difference B - A" for |
Gday @erikh2000 This was code I added trying to get things to nest correctly so there is a chance there is a bug in there or a better way to do things. I'll try and take a look one night this week and report back. Its also worth noting that sometimes leaflet does seem to struggle a bit with rendering multipolys with holes. I can't remember any specifics now but Im sure I've seen cases that have rendered weird. So check out the actual results as well as the visual results in one trick I've learnt. Sorry things are slow at the moment - as you've probably worked out everyone involved in this lib is working on it in their spare time. Cheers |
This is similar to #68 but maybe different:
The code below attempts to subtract the square (with the hole) from the triangle.
Output of log above:
This produces a nifty-looking multipolygon like this:
The middle shape is actually an inner ring, and it should be present in the result as a POLYGON--not an inner ring. As it stands, the inner ring is not contained by an outer ring, so makes objectively incorrect geoJson as well. My hunch is there is some bug with setting the status to "inside" or "outside" during sweep evaluation, but I am just learning how the Martinez algorithm works and reluctant to jump into the deeper code to make changes. (At least today, I am. :) )
The text was updated successfully, but these errors were encountered: