Subscribe to this thread
Home - General / All posts - Computing average width, maximum width, and minimum width of a polygon off of a common border.
drtees57 post(s)
#11-Mar-19 22:35

I am working on a buffer mitigation plan for a project that deviates from standard buffer width prescriptions. In this case, I know the area of the proposed mitigation and the length of the common border. I need to know the average width of the proposed buffer off of the common border, the maximum width, and the minimum width. The average width is essentially the area of the buffer polygon divided by the length of the common border. However, calculating the maximum and minimum widths is requiring more effort on my part.

Is there a function in either M8 or M9 that will do these calculations?

I have provided an MIF file of the area in question.

Attachments:
50ft Buffer.mid
50ft Buffer.mif
50ft Buffer.xml

adamw


8,447 post(s)
online
#12-Mar-19 11:55

There's no built-in function to do so, but you can perhaps produce a series of buffers and look at how they interact with the original data to determine an approximation for both minimum and maximum width.

Specifically, with border line L and area A:

* for minimum width, compute a series of buffers of L of increasing sizes (perhaps take the average width W you already found, then use W/10, 2*W/10, 3*W/10, ..., W - easy to do using CALL ValueSequence(...) in 9), intersect each buffer with the area A, and look at the number of branches in the result - the moment the number of branches in the result becomes greater than the number of branches in A (one or more the branches got split), this is an approximation for the minimum width;

* for maximum width, compute a similar series of buffers of L of increasing sizes (but go up from average width W to, say, radius of the common enclosing circle), intersect each buffer with the area A and look when the result is going to become empty (the buffer covers the whole area) - this is an approximation of the maximum width.

This all is pretty computationally intensive, but should work for reasonable data sizes.

Maybe there's an easier way.

drtees57 post(s)
#12-Mar-19 15:54

Actually, I believe I have come up with a concept for an automated process to determine maximum and minimum widths based on an area and a common bordering line. The border line has a bearing associated with it, so it is an easy task to determine the bearing of a perpendicular line. Select the area and apply the points transform. Next step is to select all the points on the area that are opposite the border line. For each point, insert a perpendicular line (border line bearing minus ninety degrees) that exceeds the maximum width. Select all the perpendicular lines thus created and use the split by transform to trim off that portion of the line that exceeds the width of the area. Select all these lines and use the average, maximum, and minimum functions in Viewbots on the line lengths.

This obviously calls for a script, which I am not knowledgeable to write.

adamw


8,447 post(s)
online
#13-Mar-19 09:03

If the border line has a bearing, ie, can be approximated with a straight line, then the above can be simplified to: take all points of the area, compute distance to the line, select min / max / whatever from the computed distances. There would need to be some filtering to only use points that are on the "opposite" side of the line should use some heuristic to filter out points on the "left" and "right" sides of the area that go from the line to the "opposite" side that interests us, but perhaps this could be done. No building perpendiculars / clipping needed, however, just compute the distance from point to line using a built-in function.

Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.