[postgis-users] Buffer() Arc Tolerance

Richard_D_Levine at raytheon.com Richard_D_Levine at raytheon.com
Wed Oct 13 10:25:09 PDT 2004


Hi Paul,

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 circle
described by the point and buffer distance (radius).  The arc tolerance is
the farthest distance from any side of the polygon to the circumference of
the (imaginary) circle.  The number of points in the returned polygon from
Oracle is determined by the radius of the circle and the arc tolerance.

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

Arc tolerance is not considered by the OGC spec.  The Simplify() function
has tolerance, but that's the distance measure from the Douglas-Puecker
algorithm, which only works on multi-lines and polygons.

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

Any ideas?

Thanks,

Rick


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




For nitty gritty the details, sometime you have to "use the source, Luke".

 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.)
>
> Thanks,
>
> Rick
_______________________________________________
postgis-users mailing list
postgis-users at postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users








More information about the postgis-users mailing list