I am looking for a good, fast, and reliable (did I say "cheap" as well?) polygon buffering algorithm. I have scanned throught the wolf book, followed the perfunctorily related thread on Points, Lines. Polygons OO my, and googled. Googling, much to my irritation, brings up gazillions of hits on polygon buffering as in graphics cards. I am looking for polygon buffering as in geography.

Given an irregular polygon, and a buffer distance 'd', create an outer polygon so the width of the corridor between the outer and the inner polygon is 'd'.

Any monks with knowledge in this area, please guide.

Update: clarification -- the above would apply not just to polygons but, by reduction, also to lines and points.

A polygon with no internal space is simply a line (regular or irregular), so buffering it would be like finding the floodplain of a river.

And a buffer for a point would be nothing but a circle. This last one, of course, is easy by itself. But it would be nice if the same algorithm would take into account all the above cases.


In reply to polygon buffering algorithms by punkish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.