You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Personally, I preprocess the polygons with cascaded_union from shapely.ops.
I guess you want to avoid external dependencies. But I also guess that's the best implementation we can find.
(And shapely could also be useful for other preprocessing, as for #21)
@deboc thanks for the suggestion. Yeah, I have tried to avoid dependencies. I am working on proper documentation on branch documentation. I might just reference Shapely and the specific function with an example, then let it be up to the user to do it.
overlaps = True
while overlaps:
overlaps = False
for each polygon n:
for each polygon m:
# https://techoverflow.net/2017/02/23/computing-bounding-box-for-a-list-of-coordinates-in-python/
# checking bounding boxes is a quick way to see if two polygons potentially overlap.
if the bounding box of n overlaps with the bounding box of m:
# combine the polygons or return both if they don't actually overlap
https://stackoverflow.com/questions/2667748/how-do-i-combine-complex-polygons
overlaps = True
Worst case this runs in O(n^3), i.e. all polygons overlap.
The text was updated successfully, but these errors were encountered: