-
Notifications
You must be signed in to change notification settings - Fork 171
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
How to split polygon with a line? #139
Comments
Any updates on the same? |
I haven't used it personally, but a quick web search seems to suggest that the geos polygonize functionality might be able to solve this for you. Seems like the workflow for your specific case (polygon + line) might be something like:
GEOSwift 5 has support for 1 (boundary) and 2 (union) but not 3 (polygonize). Let's mark this as a feature request and get it added to a future version of the library. In the meantime, you might be able to accomplish what you want by using geos directly instead of GEOSwift. If you do, please share anything you learn to help us add support for polygonize to GEOSwift. |
@ganisback @piyushvaish if you still need this feature, I've just pushed a branch that exposes polygonize and enables this use case. Here's an example of how you can do it:
which results in
(cleaned up for readability). If you have a chance, give it a try and let me know how it works for your use case. |
This is now available in v6.2.0. Enjoy! |
Hi All, is there any way to split a polygon? very appreciated if have an example.
The text was updated successfully, but these errors were encountered: