-
Notifications
You must be signed in to change notification settings - Fork 432
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
Allow VariableBuffer to take in BufferParameters? #992
Comments
Unfortunately |
What if I only want to buffer polygons on one side, but not on the other?
Will that simplify the problem? We ignore other considerations like whether
the end sections should be mitered or not.
if it's not doable from within the engine, how about we manually process it
from the outside:
1. Buffer the polygon via variable buffer
2. Extend the original (poly)line so that it cuts through the buffered
polygon at two points.
3. Traverse the two cut points, from the start to the end, and we can
already form a close polygon that is buffered at only one side
Is this algorithm sound? It seems too simple, too good to be true.
…On Thu, Jul 20, 2023 at 10:26 AM Martin Davis ***@***.***> wrote:
Unfortunately VariableBuffer uses a different technique than the Buffer
algorithm, and it is not obvious how to adapt it to produce single-sided
buffer output.
—
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADENIZRPQTHM26I7IIJPN4LXRCJLVANCNFSM6AAAAAA2QXSWCQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
For buffering polygons, can you simply compute the difference (or intersection) of the polygon and the buffer to get the outside (or inside) buffer? |
I'm not too sure what you mean. What is "the polygon" ( the first one)
referring to? Initially I only have a polyline, and I blow it up ( on both
sides) to make it into a buffered polygon. There is no another polygon that
I can use to perform the difference ( or intersection) operation with.
…On Thu, Jul 20, 2023 at 10:42 AM Martin Davis ***@***.***> wrote:
What if I only want to buffer polygons on one side, but not on the other?
For buffering polygons, can you simply compute the difference (or
intersection) of the polygon and the buffer to get the outside (or inside)
buffer?
—
Reply to this email directly, view it on GitHub
<#992 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADENIZUIOIBRR7HQH4JYO7LXRCLJJANCNFSM6AAAAAA2QXSWCQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Oh, I see, you were talking about buffering a line. In that case, your technique will work, as long as the line doesn't self-intersect too much, and the endpoints are not too close to the rest of the line. So for many cases, this will work, but it's not a fully general solution. |
Similar to Buffer, I think VariableBuffer should also be able to take in BufferParameters as an argument.
This is because I want to use one side buffering for VariableBuffer also. The method Buffer(Geometry, Double[]) would be an ideal extension to take in the BufferParameters
The text was updated successfully, but these errors were encountered: