-
Notifications
You must be signed in to change notification settings - Fork 127
calculate center and radius of polygon? #152
Copy link
Copy link
Open
Description
Is it possible / are there plans to keep track of the center and radius of a polygon?
My use case:
- first: keep adding coordinates to end of polygon until certain radius is exceeded
- then: keep removing coordinates from start of polygon until radius is within defined limit
For this I need to calculate the weighted center of the current polygon (not: average of the bounding box) and the radius of the coordinates.
Bonus points when average is calculated by keeping track of the sums of x/y/z (and dividing by number of coordinates) instead of calculating/adding all x/y/z's when center is calculated.
Reactions are currently unavailable