-
Notifications
You must be signed in to change notification settings - Fork 181
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
Implement Polygon.Intersection #44
Comments
Yep, it is totally acceptable. ;-) e7cfa0c added Polygon.Contains and Polygon.Intersects. To clarify, you're after the equivalent of C++'s |
Yes, I mean the equivalent of |
This contributes to #44. Signed-off-by: David Symonds <[email protected]>
This contributes towards #44. Signed-off-by: David Symonds <[email protected]>
I'm interested in contributing a PR for this — are there any thoughts on using Martinez-Rueda for the boolean operation algorithm? Or would it be best to port the C++ version accordingly? |
There is a port of (one of) the Martinez-Rueda algorithms here. However, that one is for planar geometry, not sure that it would work here? |
@ctessum I'm not sure myself. The projection onto a plane would conserve intersection points but not lengths.. is it naive to assume the lengths are proportional and thus area is conserved after we project back to the sphere? |
any update on this? Curious if anyone is actively working on this piece? |
@alphairys I don't have an update/I haven't been working on it. If you're looking for a workaround, I've been using CellUnions (after covering the polygon with cells) as a workaround, and they implement simple binary operations like CellUnionFromIntersection. |
There is still work being done on this |
I think someone has already done that https://github.com/davidreynolds/gos2/blob/master/s2/polygon_test.go |
Since it seems acceptable to use this space to indicate interest in specific features, I would like to request polygon intersections. The Go language currently lacks a high quality library for boolean operations on geographic features, and having one would help me out greatly. (I am one of the maintainers of a low-to-medium quality library.) I greatly appreciate all the work that has happened so far to port this library to Go.
The text was updated successfully, but these errors were encountered: