[postgis-users] Buffer() Arc Tolerance

Richard_D_Levine at raytheon.com Richard_D_Levine at raytheon.com
Wed Oct 13 11:13:45 PDT 2004

LLOL (Lunatic LOL)

My project is safety critical.  Our safety engineers want the polygon
scribed outside of the circle instead of inside it to ensure that the
radius is covered at a minimum.  There's just no talking to those folks.  I
add the arc tolerance to the radius before calling Make_Buffer_Polygon() to
solve the problem.

If the extra parameter is exposed, I can figure out the rest.  An
icosidodecagon is overkill for my stuff most of the time.  Using a value
smaller than 8 should enhance performance.

Does the world really need a word for 32 sided polygon?  Icosidodecagon has
the same number of characters as 32sidedpolygon.



|         |           Paul Ramsey                       |
|         |           <pramsey at refractions.net>         |
|         |           Sent by:                          |
|         |           postgis-users-bounces at postgis.refr|
|         |           actions.net                       |
|         |                                             |
|         |                                             |
|         |           10/13/2004 12:34 PM               |
|         |           Please respond to PostGIS Users   |
|         |           Discussion                        |
|         |                                             |
  |                                                                                              |
  |       To:       PostGIS Users Discussion <postgis-users at postgis.refractions.net>             |
  |       cc:                                                                                    |
  |       Subject:  Re: [postgis-users] Buffer() Arc Tolerance                                   |

Richard_D_Levine at raytheon.com wrote:

> Forgive me for using the O word, but my application is currently using
> Oracle Spatial, and I want to try it out on PostGIS.  Oracle Spatial's
> Buffer() function (Make_Buffer_Polygon()) takes arc tolerance as a
> parameter.  For a point, it scribes a equal-sided polygon inside the
> described by the point and buffer distance (radius).  The arc tolerance
> the farthest distance from any side of the polygon to the circumference
> the (imaginary) circle.  The number of points in the returned polygon
> Oracle is determined by the radius of the circle and the arc tolerance.

I see. I don't know if I like the way Oracle has exposed that particular
knob (seems needlessly obfuscating the underlying action, which is the
creation of N edges to approximate the arc). However, I can see that the
occasional lunatic user (*cough*) might actually need to twiddle it.

>>From what you said below, it appears that the PostGIS Buffer() will
> an octagon.  Is that correct?

No, as Martin noted, the parameter refers to the number of segments per
90 degrees, so applying it circularly, you will get an icosidodecagon (I
love the internet). http://www.google.com/search?q=icosidodecagon

> It appears I've hit a snag, because I need to construct arbitrarily
> polygons by taking the union of buffer polygons around points and
> (multi)lines.
> Any ideas?

We can add a parameter to the Buffer() postgis exposes easily enough,
since GEOS/JTS allows this parameter to be modified.


> For nitty gritty the details, sometime you have to "use the source,
>  From PostGIS source:
>      Geometry *g3 = g1->buffer(width);
> So, PostGIS is not defining a stroke angle, or using anything other than
> the defaults, it's the GEOS code which is controlling what is done.
> Hitting the GEOS code, source/operation/buffer is the place to go, but
> the documentation of DEFAULT_QUADRANT_SEGMENTS seems a bit thin. I can
> tell you that the default is 8, which is what PostGIS uses.
> What do you mean by the arc tolerance? The number of vertices used to
> approximate the circular structure?
> Richard_D_Levine at Raytheon.com wrote:
>>If I use Buffer() on a point to approximate a geodetic circle, how do I
>>determine the arc tolerance of the returned polygon to the circle?
>>Is there any documentation that contains answers to questions like this?
>>I've read the PostGIS documentation cover to cover and the function
>>explanations are at a very high level (mostly copied from the OGC spec.)

postgis-users mailing list
postgis-users at postgis.refractions.net

More information about the postgis-users mailing list