Replies: 1 comment
-
If they aren't hitting each other, how can you union them. You'll just have a Paths entity with each island being a Path. If you want to forcibly join them, you'll probably need to find the nearest points between each island pair and stitch an edge. A kd-tree library can help with this - there are a few around. I'd set the Z coordinate for all points on each island to an index (e.g. 10 for first island, 11 for second island, etc.) so that you can find the owner of the point. Then take island 1. Add all its points to the kd-tree library as the source. Add all other points for all other islands to the target of the search. Get the nearest point. Query its Z value to find the island. You can now run an edge from island 1 to island 'Z' and join them up into a sequence. Take that result as the new source. Take all islands except the original 1 and 'Z' and use them as a target to find the next nearest point. Rinse and repeat. Just a quick thought. |
Beta Was this translation helpful? Give feedback.
-
I have a list of polygons that aren't hitting each other, but I want to join everyone in one big polygon.
I've tried using all alternatives in Union, but without success.
Beta Was this translation helpful? Give feedback.
All reactions