>>And a buffer for a point would be nothing but a circle.>Yes, but that's not a polygon. If you take a line
>segment, and you take the set of points that at
>distance d, you get two half circles joined by two
>line segments - not a polygon either.
Interesting. Why is that, may I ask? As far as I can see (and I've been working in the GIS field for about 20 yrs believing it to be so), a circle is indeed a polygon as much as a buffer of line is. Btw, in your description above, the buffer is of a single straight-line segment. Of course, a line can be made of any number of line segments, or arcs. A line is nothing but a series of x,y pairs that don't end up where they started. While a polygon is the same as above except the first and the last pair are the same.
In any case, the problem actually is surprisingly hard. That is because of all the different manners in which a polygon or a line can be configured. One has to determine the inside vs. the outside worlds wrt the polygon (of course, for buffering, one would want to remain on the outside), which can differ based on the slope of that particular line segment and the direction of one's travel (clockwise vs. counter-clockwise). Then there is the thorny issue of vertices, as brought up above.
When all is said and done, it has to be fast.
Now, I know there are algorithms out there... well established, because the solution exists in commercial software. I am simply unable to find references to the darn algorithms in published literature so I can start exploring the possibility of building one as an open source solution.
In reply to Re^2: polygon buffering algorithms
by punkish
in thread polygon buffering algorithms
by punkish
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |